/** - ¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì ÀÇ·áÁ¤º¸ - Åð¿øºÐ¼®°ü¸® ( SMMRD00400_Åð¿øºÐ¼®°ü¸®.xrw - JScript ) - Version : 1) : Ver.1.00.01 - Author : ¹ÚÁ¾ÈÆ ¼öÁ¤->ÀÌâ·Ï - ¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì **/ var xDschAnalyListPath = "/root/main/dschanalyhist/dschanalyinfo"; var xPatBaseInfoListPath = "/root/temp/patinfo/patbaseinfo"; var xDschDDListPath = "/root/temp/patinfo/dschddlist"; var xICUTotListPath = "/root/main/dschanalyhist/icutotlist/icudept"; /** * @ver : 2007-12-05 * @desc : È­¸éÃʱâÈ­ * @ * @by : ¹ÚÁ¾ÈÆ * @param : * @return : * @--------------------------------------------------- */ function fInitialize() { //2010/01/06 hkjoo Ãß°¡ //ÀÔ¿øÃë¼Ò ȯÀÚ Ã³¸® ½Ã µ¥ÀÌÅÍ º¹¿øÀ» À§ÇØ ºó³ëµå¸¦ Ä«ÇÇÇØ ³õ´Â´Ù. model.copyNode("/root/temp/dschanalyhist", "/root/main/dschanalyhist"); //btn_icuinfo.selected ="true"; //btn_addrow3.visible = false; //btn_delrow3.visible = false; // °øÅëÄÚµå ¸ñ·Ï °¡Á®¿À±â/root/init/opclrsinfo2 //üŷ¹øÈ£ true -> false º¯°æ chk_cretchknum.value = "false"; zbcfGetCodeList(new Array("M0149", "M0070", "M0151", "M0153", "M0155","M0152","M0157","M0156", "M0158","M0159","M0086","M0167", "M0165","M0013","P0006","M0417", "A0130","P0008","M0413","M0484", "A0145","M0414","M0415","M0416", "M0543" ), new Array("/root/init/jobList", "/root/init/relignList", "/root/init/maryStatList", "/root/init/inPathList", "/root/init/dethTypeList","/root/init/cureRsltList" ,"/root/init/DschTypeList","/root/init/chosProgList", "/root/init/reInResnList","/root/init/reOpResnList","/root/init/partrtntypeList","/root/init/brthtypeList", "/root/init/womntypeList","/root/init/optypeList","/root/init/mskindList","/root/init/unprepstatlist", "/root/init/infdisflaglist","/root/init/insukindList","/root/init/opDethTypeList","/root/init/infccaselist", "/root/init/infdcpartlist","/root/init/cmpllist","/root/init/wundcasclslist","/root/init/disposstatlist", "/root/init/nbabyList" ) , true); // Áø·á°ú /* var instcd = getUserInfo("dutplceinstcd"); var standard_yn = "orduseyn"; var ord_deptflag = 'D'; var rslt_ref = "/root/init/deptlist"; var sort_method = "depthngnm"; zbcfGetDeptCodeList(instcd, standard_yn, ord_deptflag, rslt_ref, sort_method);*/ model.removeNodeset("/root/main/dschanalyhist/oplist"); model.removeNodeset("/root/main/dschanalyhist/cnstlist"); model.removeNodeset("/root/main/dschanalyhist/wnmblist"); model.removeNodeset("/root/main/dschanalyhist/chngdeptlist"); model.removeNodeset("/root/main/dschanalyhist/iculist"); model.removeNodeset("/root/main/dschanalyhist/infdislist"); model.removeNodeset("/root/main/dschanalyhist/indxlist"); if(checkOpener()){ var parampid = opener.javascript.getParameter("SMMRD00400_param_pid"); if(parampid != "") { ipt_pid.value = parampid; chk_cretchknum.value = "false"; fPidKeyPress("init"); //µî·Ï¹øÈ£·Î ȯÀÚ Á¤º¸Á¶È¸ } } model.refresh(); } /** * @desc : ÀÌÁß¹øÈ£ üũ * @id : * @event : onkeypress * @return : void * @authur : ¹Ú¼ºÈ£ Ãß°¡ */ function fDoublePidChk() { model.resetInstanceNode("/root/main/patinfo"); model.makeNode("/root/main/patinfo"); if(submit("TRPMC02500")){ //fSearch´Â ÀÎÀû»çÇ× È­¸éÀ» ÀÓÆ÷Æ® ÇØ°£ È­¸é¿¡¼­ ±¸ÇöÇØ ÁÖ¾î¾ß ÇÏ´Â ÇÔ¼öÀÌ´Ù. if( getNodesetCount("/root/main/patinfo/patinfolist") > 0 ){ //* 2009.04.07. ÀÌÁß¹øÈ£ ¸Þ¼¼Áö ( 14257937 ¹Ú¿ë¼® -> 13275912 ½Å¿Á¼ø ) var sBindPid = model.getValue("/root/main/patinfo/patinfolist/bindpid"); //alert(sBindPid); if( sBindPid != '-' && sBindPid != '' && sBindPid != ' ' ){ //ÇÕ¹øµÈ µî·Ï¹øÈ£ ¸Þ¼¼Áö ó¸® var sPid = model.getValue("/root/main/patinfo/patinfolist/pid"); var sHngnm = model.getValue("/root/main/patinfo/patinfolist/hngnm"); var retValue = messageBox(sPid + " (" + sHngnm + ") ȯÀÚÀÇ µî·Ï¹øÈ£°¡ [ " + sBindPid + " ] ·Î ÇÕ¹ø µÇ¾ú½À´Ï´Ù. ÇÕ¹øµÈ µî·Ï¹øÈ£·Î ÀçÁ¶È¸ ÇϽðڽÀ´Ï±î?", "Q999", ""); if( retValue == '6' ){ /* À̺¥Æ® ´Ù½Ã ó¸®Çؼ­ ÀçÁ¶È¸ ó¸®ÇÔ.. model.makeValue(iptObj.attribute("ref"), sBindPid); iptObj.refresh(); fCheckPid(iptObj, refPnm, refRrgstno); return ""; //*/ //model.makeValue(ipt_pid.attribute("ref"), sBindPid); model.setValue("/root/main/dschanalyhist/dschanalyinfo/pid", sBindPid); model.makeValue("/root/send/pid", sBindPid); ipt_pid.refresh(); return true; } return false; } return true; //*/ } else { model.resetInstanceNode("/root/main/patinfo/patinfolist"); messageBox("¾ø´Â ȯÀÚ ¹øÈ£ ÀÔ´Ï´Ù.", "E999", ""); model.refresh(); return false; } } return true; } /** * @desc : ȯÀÚ¹øÈ£ Á¤º¸Á¶È¸ * @id : * @event : onkeypress * @return : void * @authur : ¹ÚÁ¾ÈÆ Ãß°¡->ÀÌâ·Ï */ function fPidKeyPress(pFlag) { cpt_patdethinfo.visible = false; var fromtime = getCurrentDateTime(); model.removeNodeset("/root/send"); var paramdschdd = ""; model.makeValue("/root/send/srchcond", "1"); if(model.getValue("/root/init/checknum/value") == "true"){ model.makeValue("/root/send/pid", getCretCheckNo(ipt_pid.currentText, getUserInfo("dutplceinstcd"))); model.makeValue("/root/main/dschanalyhist/dschanalyinfo/pid", model.getValue("/root/send/pid")); } else { model.makeValue("/root/send/pid", ipt_pid.currentText); } // ÀÌÁß¹øÈ£ üũ °ü·Ã //model.setValue("/root/send/srchcond", "1"); //model.setValue("/root/send/pid", ipt_pid.currentText); //ȯÀÚµî·Ï¹øÈ£ üũ if(ipt_pid.currentText.length >= 1 ){ model.resetInstanceNode("/root/main/patinfo"); model.makeNode("/root/main/patinfo"); //if(submit("TRPMC02500")) var pidchk = fDoublePidChk(); //alert(pidchk); if ( pidchk == true ) { //fSearch´Â ÀÎÀû»çÇ× È­¸éÀ» ÀÓÆ÷Æ® ÇØ°£ È­¸é¿¡¼­ ±¸ÇöÇØ ÁÖ¾î¾ß ÇÏ´Â ÇÔ¼öÀÌ´Ù. if(submit("TRMRD00401", false)){ //fSearch´Â ÀÎÀû»çÇ× È­¸éÀ» ÀÓÆ÷Æ® ÇØ°£ È­¸é¿¡¼­ ±¸ÇöÇØ ÁÖ¾î¾ß ÇÏ´Â ÇÔ¼öÀÌ´Ù. if( getNodesetCnt(model, xPatBaseInfoListPath) > 0 ){ model.resetInstanceNode(xDschAnalyListPath); model.setValue(xDschAnalyListPath+"/pid" ,model.getValue(xPatBaseInfoListPath+"/pid")); model.setValue(xDschAnalyListPath+"/hngnm" ,model.getValue(xPatBaseInfoListPath+"/hngnm")); model.setValue(xDschAnalyListPath+"/rrgstno1" ,model.getValue(xPatBaseInfoListPath+"/rrgstno1")); model.setValue(xDschAnalyListPath+"/rrgstno2" ,model.getValue(xPatBaseInfoListPath+"/rrgstno2")); model.setValue(xDschAnalyListPath+"/age" ,model.getValue(xPatBaseInfoListPath+"/age")); model.setValue(xDschAnalyListPath+"/sexflag" ,model.getValue(xPatBaseInfoListPath+"/sex")); model.setValue(xDschAnalyListPath+"/btype" ,model.getValue(xPatBaseInfoListPath+"/btype")); model.setValue(xDschAnalyListPath+"/rh" ,model.getValue(xPatBaseInfoListPath+"/rh")); model.setValue(xDschAnalyListPath+"/forgeryn" ,model.getValue(xPatBaseInfoListPath+"/forgeryn")); model.setValue(xDschAnalyListPath+"/telno" ,model.getValue(xPatBaseInfoListPath+"/hometel")); model.setValue(xDschAnalyListPath+"/mpphontel",model.getValue(xPatBaseInfoListPath+"/mpphontel")); model.setValue(xDschAnalyListPath+"/zipcd1" ,model.getValue(xPatBaseInfoListPath+"/zipcd1")); model.setValue(xDschAnalyListPath+"/zipcd2" ,model.getValue(xPatBaseInfoListPath+"/zipcd2")); model.setValue(xDschAnalyListPath+"/addr" ,model.getValue(xPatBaseInfoListPath+"/addr")); model.setValue(xDschAnalyListPath+"/detladdr" ,model.getValue(xPatBaseInfoListPath+"/detladdr")); model.removeNodeset("/root/main/dschanalyhist/oplist"); model.removeNodeset("/root/main/dschanalyhist/cnstlist"); model.removeNodeset("/root/main/dschanalyhist/wnmblist"); model.removeNodeset("/root/main/dschanalyhist/chngdeptlist"); model.removeNodeset("/root/main/dschanalyhist/iculist"); model.removeNodeset("/root/main/dschanalyhist/infdislist"); model.removeNodeset("/root/main/dschanalyhist/indxlist"); model.setValue("/root/main/cond/statcnts",""); if( (getNodesetCnt(model,"/root/temp/patinfo/chgdschddlist") > 0) ||(getNodesetCnt(model,"/root/temp/patinfo/dschddlist") > 0)){ if(pFlag == "init"){ if(checkOpener()){ paramdschdd = opener.javascript.getParameter("SMMRD00400_param_dschdd"); } if(paramdschdd != ""){ model.setValue(xDschAnalyListPath+"/dschdd", paramdschdd); }else{ model.setValue(xDschAnalyListPath+"/dschdd" , model.getValue("/root/temp/patinfo/chgdschddlist[1]/dschdd")); } }else{ model.setValue(xDschAnalyListPath+"/dschdd", model.getValue("/root/temp/patinfo/chgdschddlist[1]/dschdd")); } // 20081218 ¼öÁ¤ //cmb_dschdd.refresh(); fGetDschAnalyInfo(); model.setValue(xDschAnalyListPath+"/orgdschdd", model.getValue("/root/temp/patinfo/dschddlist[1]/dschdd")); // 20081218 ¼öÁ¤ //cmb_orgdschdd.refresh(); } // 2013.09.23 CYW START --------------------------------------------------------------- var pid = model.getValue(xPatBaseInfoListPath+"/pid"); model.makeValue("/root/send/dethinfo/pid" , pid ); model.makeValue("/root/send/dethinfo/instdcd" , getUserInfo("dutplceinstcd") ); if( submit("TRMRD00418") ){ var patdethcnt = getNodesetCount("/root/main/patdethinfo/patdethlist"); if( patdethcnt > 0 ){ cpt_patdethinfo.visible = true; }else{ cpt_patdethinfo.visible = false; } } // 2013.09.23 CYW END ------------------------------------------------------------------ }else{ messageBox("¾ø´Â ȯÀÚ ¹øÈ£ ÀÔ´Ï´Ù.", "E999", ""); } } model.refresh(); } else { model.setFocus("ipt_pid"); model.refresh(); } /* if(submit("TRMRD00401", false)){ //fSearch´Â ÀÎÀû»çÇ× È­¸éÀ» ÀÓÆ÷Æ® ÇØ°£ È­¸é¿¡¼­ ±¸ÇöÇØ ÁÖ¾î¾ß ÇÏ´Â ÇÔ¼öÀÌ´Ù. if( getNodesetCnt(model, xPatBaseInfoListPath) > 0 ){ model.resetInstanceNode(xDschAnalyListPath); model.setValue(xDschAnalyListPath+"/pid" ,model.getValue(xPatBaseInfoListPath+"/pid")); model.setValue(xDschAnalyListPath+"/hngnm" ,model.getValue(xPatBaseInfoListPath+"/hngnm")); model.setValue(xDschAnalyListPath+"/rrgstno1" ,model.getValue(xPatBaseInfoListPath+"/rrgstno1")); model.setValue(xDschAnalyListPath+"/rrgstno2" ,model.getValue(xPatBaseInfoListPath+"/rrgstno2")); model.setValue(xDschAnalyListPath+"/age" ,model.getValue(xPatBaseInfoListPath+"/age")); model.setValue(xDschAnalyListPath+"/sexflag" ,model.getValue(xPatBaseInfoListPath+"/sex")); model.setValue(xDschAnalyListPath+"/btype" ,model.getValue(xPatBaseInfoListPath+"/btype")); model.setValue(xDschAnalyListPath+"/rh" ,model.getValue(xPatBaseInfoListPath+"/rh")); model.setValue(xDschAnalyListPath+"/forgeryn" ,model.getValue(xPatBaseInfoListPath+"/forgeryn")); model.setValue(xDschAnalyListPath+"/telno" ,model.getValue(xPatBaseInfoListPath+"/hometel")); model.setValue(xDschAnalyListPath+"/mpphontel",model.getValue(xPatBaseInfoListPath+"/mpphontel")); model.setValue(xDschAnalyListPath+"/zipcd1" ,model.getValue(xPatBaseInfoListPath+"/zipcd1")); model.setValue(xDschAnalyListPath+"/zipcd2" ,model.getValue(xPatBaseInfoListPath+"/zipcd2")); model.setValue(xDschAnalyListPath+"/addr" ,model.getValue(xPatBaseInfoListPath+"/addr")); model.setValue(xDschAnalyListPath+"/detladdr" ,model.getValue(xPatBaseInfoListPath+"/detladdr")); model.removeNodeset("/root/main/dschanalyhist/oplist"); model.removeNodeset("/root/main/dschanalyhist/cnstlist"); model.removeNodeset("/root/main/dschanalyhist/wnmblist"); model.removeNodeset("/root/main/dschanalyhist/chngdeptlist"); model.removeNodeset("/root/main/dschanalyhist/iculist"); model.removeNodeset("/root/main/dschanalyhist/infdislist"); model.removeNodeset("/root/main/dschanalyhist/indxlist"); model.setValue("/root/main/cond/statcnts",""); if( getNodesetCnt(model,"/root/temp/patinfo/dschddlist") > 0){ if(pFlag == "init"){ if(checkOpener()){ paramdschdd = opener.javascript.getParameter("SMMRD00400_param_dschdd"); } if(paramdschdd != ""){ model.setValue(xDschAnalyListPath+"/dschdd", paramdschdd); }else{ model.setValue(xDschAnalyListPath+"/dschdd" , model.getValue("/root/temp/patinfo/chgdschddlist[1]/dschdd")); } }else{ model.setValue(xDschAnalyListPath+"/dschdd", model.getValue("/root/temp/patinfo/chgdschddlist[1]/dschdd")); } // 20081218 ¼öÁ¤ //cmb_dschdd.refresh(); fGetDschAnalyInfo(); model.setValue(xDschAnalyListPath+"/orgdschdd", model.getValue("/root/temp/patinfo/dschddlist[1]/dschdd")); // 20081218 ¼öÁ¤ //cmb_orgdschdd.refresh(); } }else{ messageBox("¾ø´Â ȯÀÚ ¹øÈ£ ÀÔ´Ï´Ù.", "E999", ""); } } model.refresh(); */ }else{ messageBox("ȯÀÚµî·Ï¹øÈ£¸¦ Á¤È®È÷", "C001"); } var totime = getCurrentDateTime(); //alert("from: " + fromtime + " to:" + totime); } /** * @desc : Åð¿øºÐ¼® Á¤º¸ Á¶È¸ * @id : * @event : xforms-select * @return : void * @authur : */ function fGetDschAnalyInfo(){ var sDschDD = model.getValue(xDschAnalyListPath+"/dschdd"); var sInDD = model.getValue("/root/temp/patinfo/chgdschddlist[dschdd='"+sDschDD+"']/indd"); //2010.03.31. ÀÌÀº¿µ : Åð¿øÀÏÀÚ ±âÁØÀ¸·Î ºÐ°úÁ¤º¸ °¡Á®¿È. (¼­¿ï¼º¸ð¸¸ - ¿Ü°úºÐ°ú ¶§¹®¿¡ Åð¿øÀÏ ±âÁØÀ¸·Î ºÐ°úÄڵ带 °¡Á®¿È.) if (getUserInfo("dutplceinstcd") == "000") { model.makeValue("/root/send/gsdeptcd", ""); model.makeValue("/root/send/stndd", sDschDD); submit("TRMRD00417"); copyNodeset("/root/temp/patinfo/clrsdeptinfo/opclrsdeptlist" , "/root/init/gsclrsinfo/gsclrsdeptlist"); copyNodeset("/root/temp/patinfo/clrsdeptinfo/chngclrsdeptlist", "/root/init/gsclrsinfo/gsclrsdeptlist"); copyNodeset("/root/temp/patinfo/clrsdeptinfo/cnsclrsdeptlist1", "/root/init/gsclrsinfo/gsclrsdeptlist"); copyNodeset("/root/temp/patinfo/clrsdeptinfo/cnsclrsdeptlist2", "/root/init/gsclrsinfo/gsclrsdeptlist"); copyNodeset("/root/temp/patinfo/clrsdeptinfo/icuclrsdeptlist" , "/root/init/gsclrsinfo/gsclrsdeptlist"); } // Åð¿ø´ç½Ã Áø·á°úÀüü model.removeNodeset("/root/init/dschdeptlist/dept"); zsdfGetInOrdDeptList(getUserInfo("dutplceinstcd"), "/root/init/dschdeptlist", "depthngnm", "asc", sDschDD); model.removeNodeset("/root/send"); model.makeValue("/root/send/stntodd", sDschDD); //ÁõȯÀÚ½Ç ±âÁØÀÏÀÚ º¯°æ(Åð¿øÀÏÀÚ -> ÀÔ¿ø,Åð¿øÀÏÀڷκ¯°æ (20090408)) model.makeValue("/root/send/stnfromdd", sInDD); // ÁßȯÀÚ½Ç ÄÚµå Á¶È¸ if(submit("TRMRD00404", false)){ copyNodesetType("/root/init/icudeptlist/icudept","/root/temp/initlist/icudept","replace", model, model); } //2009-05-15 ¿ÀÀü 9:40:22 °­ÁöÈÆ ¼öÁ¤ : Åð¿øÀÏÀÚ ±âÁØÀ¸·Î ÁöÇ¥°ü¸® Ç׸ñÀ» º¸¿©ÁØ´Ù. model.removeNodeset("/root/init/indxlist/indx"); chk_indxlist.refresh(); submit("TRMRD00407"); chk_indxlist.refresh(); model.removeNodeset("/root/send"); var sIndx = cmb_dschdd.focusIndex+1; model.makeValue("/root/send/pid", model.getValue(xDschAnalyListPath+"/pid")); model.makeValue("/root/send/indd", model.getValue(xDschDDListPath+"["+sIndx+"]/indd")); model.makeValue("/root/send/careinrmtm", model.getValue(xDschDDListPath+"["+sIndx+"]/careinrmtm")); //2010.01.11, hkjoo Ãß°¡ model.makeValue("/root/send/cretno", model.getValue(xDschDDListPath+"["+sIndx+"]/cretno")); model.makeValue("/root/send/dschdd", sDschDD); model.makeValue("/root/send/dschtm", model.getValue(xDschDDListPath+"["+sIndx+"]/dschtm"));//2010.01.11, hkjoo Ãß°¡ if(submit("TRMRD00402", false)){ var pid = model.getValue(xDschAnalyListPath+"/pid"); if ( pid != "" ) { var sIndd = model.getValue(xDschAnalyListPath+"/indd"); // 2008-10-21 ³ªÁ¾Ãµ ¼öÁ¤ ½ÇÁ¦ ÀÔ¿øÀÏÀÚ·Î Àç¿øÀϼö¸¦ ±¸ÇÔ var sInroomdd = model.getValue(xDschAnalyListPath+"/inrmdd"); var sDschdd = model.getValue(xDschAnalyListPath+"/dschdd"); var code = model.getValue(xDschAnalyListPath+"/infccascd"); //ÀÔ¿ø´ç½Ã Áø·á°úÀüü model.removeNodeset("/root/init/indeptlist/dept"); zsdfGetInOrdDeptList(getUserInfo("dutplceinstcd"), "/root/init/indeptlist", "depthngnm", "asc", sInroomdd); fInDschClrsDeptSearch("dsch");//Åð¿ø°úºÐ°ú fInDschClrsDeptSearch("indd");//ÀÔ¿ø°úºÐ°ú fGetInFcCas(code);//°¨¿°Á¾·ù üũ // ÀÔ·Â ¿©ºÎ üũ fCheckItemInputYN(); // ER³»¿øÀϽÃ, ü·ù½Ã°£ üũ var sInPathCd = model.getValue(xDschAnalyListPath+"/inpathcd"); if(sInPathCd == "02"){ ipt_erchosdt.disabled = false; ipt_erstaytm.disabled = false; }else{ ipt_erchosdt.disabled = true; ipt_erstaytm.disabled = true; } // ÁßȯÀÚ½Ç Àüü Àç¿øÀϼö model.removeNodeset("/root/main/dschanalyhist/icutotlist"); if(grd_iculist.rows > grd_iculist.fixedrows){ var sTotInHospDayNo = 0; var iRow = 0; var iICUTotRow = 0; var sICUCd = ""; for(var iStndRow = grd_iculist.fixedrows; iStndRow<=(grd_iculist.rows-grd_iculist.fixedrows); iStndRow++){ sICUCd = model.getValue("/root/main/dschanalyhist/iculist["+iStndRow+"]/icucd"); iICUTotRow = grd_icutotlist.findRow(sICUCd, grd_icutotlist.fixedrows, 1); sTotInHospDayNo = 0; if(iICUTotRow < 1){ for(var iRow = grd_iculist.fixedrows; iRow <= (grd_iculist.rows-grd_iculist.fixedrows); iRow++){ if(model.getValue("/root/main/dschanalyhist/iculist["+iRow+"]/icucd") == sICUCd){ sInHospDayNo = model.getValue("/root/main/dschanalyhist/iculist["+iRow+"]/inhospdayno"); if(sInHospDayNo == "") sInHospDayNo = 0; sTotInHospDayNo += eval(sInHospDayNo); } } grd_icutotlist.addRow(); iRow = grd_icutotlist.rows - grd_icutotlist.fixedrows; model.setValue(xICUTotListPath+"["+iRow+"]/deptcd",sICUCd); model.setValue(xICUTotListPath+"["+iRow+"]/totinhospdayno", sTotInHospDayNo); } } } if(model.getValue(xDschAnalyListPath+"/status") == "i"){ // ½Å±Ô // ÃÑ Àç¿øÀϼö °è»ê if(sInroomdd != "" && sDschdd != ""){ /* if(sIndd != "" && sDschdd != ""){ 2008-10-21 ³ªÁ¾Ãµ ¼öÁ¤ ½ÇÁ¦ Àç¿øÀϼö¸¦ ±¸ÇÔ */ var totinhospdayno = getDateInterval(sInroomdd,sDschdd); /* 2008-10-21 ³ªÁ¾Ãµ ¼öÁ¤ ½ÇÁ¦ Àç¿øÀϼö¸¦ ±¸ÇÔ var totinhospdayno = getDateInterval(sIndd,sDschdd); */ // //ÀÌÀ±ÁÖ¼öÁ¤(20131121) - ½ÃÀÛ // var erdays = model.getValue(xDschAnalyListPath+"/erdays"); // totinhospdayno -= eval(erdays); // //ÀÌÀ±ÁÖ¼öÁ¤(20131121) - Á¾·á if(totinhospdayno < 1) totinhospdayno = 1; model.setValue(xDschAnalyListPath+"/totinhospdayno", totinhospdayno); } // ȸÂ÷ /* var indg = cmb_dschdd.length-cmb_dschdd.focusIndex; model.setValue(xDschAnalyListPath+"/indg",indg); if(indg == 1){ ipt_reinresn.disabled = true; cmb_reinresncd.disabled = true; ipt_reinyncd.disabled = true; cmb_reinyn.disabled = true; }*/ var bfindg = model.getValue(xDschAnalyListPath+"/bfindg"); if(bfindg==""){ model.setValue(xDschAnalyListPath+"/indg",1); ipt_reinresn.disabled = true; cmb_reinresncd.disabled = true; ipt_reinyncd.disabled = true; cmb_reinyn.disabled = true; }else{ model.setValue(xDschAnalyListPath+"/indg",parseInt(bfindg)+1); } //ÀçÀÔ¿ø Àϼö var bfdschdd = model.getValue(xDschAnalyListPath+"/bfdschdd"); var totbfdayno = getDateInterval(bfdschdd,sInroomdd); if(bfdschdd!=""){ if((totbfdayno >=0)&&(totbfdayno <= 30)){ model.setValue("/root/main/dschanalyhist/dschanalyinfo/reinyn","01"); model.setValue(xDschAnalyListPath+"/reinyncd", model.getValue(xDschAnalyListPath+"/reinyn")); // 20081218 ¼öÁ¤ //ipt_reinyncd.refresh(); fCheckItemInputYN("reinyn"); }else{ model.setValue("/root/main/dschanalyhist/dschanalyinfo/reinyn","02"); model.setValue(xDschAnalyListPath+"/reinyncd", model.getValue(xDschAnalyListPath+"/reinyn")); // 20081218 ¼öÁ¤ //ipt_reinyncd.refresh(); ipt_reinresn.disabled = false; cmb_reinresncd.disabled = false; } }else{ model.setValue("/root/main/dschanalyhist/dschanalyinfo/reinyn","02"); model.setValue(xDschAnalyListPath+"/reinyncd", model.getValue(xDschAnalyListPath+"/reinyn")); // 20081218 ¼öÁ¤ //ipt_reinyncd.refresh(); } model.setValue(xDschAnalyListPath+"/orgdschdd", model.getValue(xDschAnalyListPath+"/dschdd")); //2013/01/08 Start fnbabychk(); //2013/01/08 End model.setValue("/root/main/cond/statcnts","Åð¿øºÐ¼®ÀÌ ÀÌ·ç¾îÁöÁö ¾Ê¾Ò½À´Ï´Ù."); model.makeValue("/root/main/detldeptcdsaveyn", "Y"); // 20081218 ¼öÁ¤ //model.refresh(); // ¼ö¼ú³»¿ª for(var iRow = grd_oplist.fixedrows; iRow <= grd_oplist.rows-grd_oplist.fixedrows; iRow++){ grd_oplist.rowStatus(iRow) = 1; } // ÇùÀÇÁø´Ü for(var iRow = grd_cnstlist.fixedrows; iRow <= grd_cnstlist.rows-grd_cnstlist.fixedrows; iRow++){ grd_cnstlist.rowStatus(iRow) = 1; } for(var iRow = grd_wnmblist.fixedrows; iRow <= grd_wnmblist.rows-grd_wnmblist.fixedrows+1; iRow++){ grd_wnmblist.rowStatus(iRow) = 1; } // Àü°úÁ¤º¸ for(var iRow = grd_chngdeptlist.fixedrows; iRow <= grd_chngdeptlist.rows-grd_chngdeptlist.fixedrows; iRow++){ grd_chngdeptlist.rowStatus(iRow) = 1; } // ÁßȯÀÚ½Ç for(var iRow = grd_iculist.fixedrows; iRow <= grd_iculist.rows-grd_iculist.fixedrows; iRow++){ grd_iculist.rowStatus(iRow) = 1; } // Àü¿°º´2008-11-23 »ç¿ëÀÚ ¿ä±¸¿¡ µû¶ó ¸·À½(ÀÌâ·Ï) /*for(var iRow = grd_infdislist.fixedrows; iRow <= grd_infdislist.rows-grd_infdislist.fixedrows; iRow++){ grd_infdislist.rowStatus(iRow) = 1; }*/ }else{ dPid = model.getValue("/root/main/dschanalyhist/dschanalyinfo/pid"); dDschdd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschdd"); sDschDD = dDschdd.substr(0,4)+"/"+dDschdd.substr(4,2)+"/"+dDschdd.substr(6,2); //2013/01/08 Start fnbabychk(); //2013/01/08 End model.setValue("/root/main/cond/statcnts",dPid+"ȯÀÚÀÇ"+sDschDD+"ÀÇ Åð¿øºÐ¼®ÀÌ µÇ¾î ÀÖ½À´Ï´Ù."); // 20081218 ¼öÁ¤ //model.refresh(); messageBox(dPid + "ȯÀÚÀÇ" + sDschDD +"ÀÇ Åð¿øºÐ¼®ÀÌ µÇ¾î","I010"); model.makeValue("/root/main/detldeptcdsaveyn", "N"); } // »ê¸ð/½Å»ý¾Æ grd_wnmblist.mergeCells = "bycol"; /* grd_wnmblist.mergeCol(6) = false; grd_wnmblist.mergeCol(7) = false; grd_wnmblist.mergeCol(8) = false; grd_wnmblist.mergeCol(9) = false; grd_wnmblist.mergeCol(10) = false; grd_wnmblist.mergeCol(11) = false; */ grd_wnmblist.mergeCol(grd_wnmblist.colRef("partrtneprccd")) = false; grd_wnmblist.mergeCol(grd_wnmblist.colRef("nbabyflag")) = false; grd_wnmblist.mergeCol(grd_wnmblist.colRef("partrtnkindcd")) = false; grd_wnmblist.mergeCol(grd_wnmblist.colRef("prgweekcnt")) = false; grd_wnmblist.mergeCol(grd_wnmblist.colRef("prgdayno")) = false; grd_wnmblist.mergeCol(grd_wnmblist.colRef("nbabybdwtqty")) = false; grd_wnmblist.mergeCol(grd_wnmblist.colRef("womnid")) = false; model.copyNode("/root/temp/dschanalyhist", "/root/main/dschanalyhist"); } else //2010/01/06 hkjoo Ãß°¡ { messageBox("ÀÔ¿øÃë¼Ò µÈ °Ç","I009"); model.copyNode("/root/main/dschanalyhist", "/root/temp/dschanalyhist"); model.resetInstanceNode("/root/main/dschanalyhist"); model.setValue(xDschAnalyListPath + "/dschdd", sDschDD); model.setValue(xDschAnalyListPath + "/pid", model.getValue("/root/send/pid")); } } // 20081218 ¼öÁ¤ //model.refresh(); chk_indxlist.refresh(); } /** * @desc : ÃʱâÈ­ * @id : * @event : xforms-select * @return : void * @authur : */ function fClearDschInfo(){ model.resetInstanceNode(xDschAnalyListPath); model.removeNodeset("/root/main/dschanalyhist/oplist"); model.removeNodeset("/root/main/dschanalyhist/cnstlist"); model.removeNodeset("/root/main/dschanalyhist/wnmblist"); model.removeNodeset("/root/main/dschanalyhist/chngdeptlist"); model.removeNodeset("/root/main/dschanalyhist/iculist"); model.removeNodeset("/root/main/dschanalyhist/infdislist"); model.removeNodeset("/root/main/dschanalyhist/indxlist"); model.removeNodeset("/root/main/dschanalyhist/icutotlist"); // ÀÔ¿øº´½ÇÁ¤º¸ model.removeNodeset("/root/init/inroomlist/room"); // Åð¿øº´½ÇÁ¤º¸ model.removeNodeset("/root/init/dschroomlist/room"); //°¨¿°Á¾·ù2 model.removeNodeset("/root/init/infdcpartinfo/infdcpartlist"); model.refresh(); } /** * @desc : º´µ¿ Á¤º¸ Á¶È¸ * @id : * @event : xforms-select * @return : void * @authur : */ function fGetWardInfo(ref, pFlag, pCtrlID){ var resultRef = "/root/temp/wardinfo"; model.removenode(resultRef); model.removenode(ref); model.makeNode(resultRef); var sCtrlID = document.controls(pCtrlID); var roomcd = sCtrlID.currentText; model.makeValue(ref+"/roomcd",roomcd); model.makeValue(ref+"/stnddd", model.getValue(xDschAnalyListPath+"/dschdd")); if(submit("TRMRD00403", "false", ref, resultRef)==true){ if(getNodesetCnt(model, resultRef+"/ward") > 0){ if(pFlag == "in"){ model.setValue(xDschAnalyListPath+"/inwardcd", model.getValue(resultRef+"/ward/wardcd")); model.setValue(xDschAnalyListPath+"/inwardnm", model.getValue(resultRef+"/ward/wardnm")); model.setValue(xDschAnalyListPath+"/inroomcd",roomcd); }else if(pFlag == "dsch"){ model.setValue(xDschAnalyListPath+"/dschwardcd", model.getValue(resultRef+"/ward/wardcd")); model.setValue(xDschAnalyListPath+"/dschwardnm", model.getValue(resultRef+"/ward/wardnm")); model.setValue(xDschAnalyListPath+"/dschroomcd",roomcd); } }else{ if(pFlag == "in"){ model.setValue(xDschAnalyListPath+"/inwardcd",""); model.setValue(xDschAnalyListPath+"/inwardnm",""); model.setValue(xDschAnalyListPath+"/inroomcd",""); }else if(pFlag == "dsch"){ model.setValue(xDschAnalyListPath+"/dschwardcd",""); model.setValue(xDschAnalyListPath+"/dschwardnm",""); model.setValue(xDschAnalyListPath+"/dschroomcd",""); } } } model.refresh(); } /** * @desc : ÁÙ Ãß°¡ * @id : * @event : xforms-select * @return : void * @authur : */ function fAddGridRow(pGrid){ var sPid = model.getValue(xDschAnalyListPath+"/pid"); var sDschDD = model.getValue(xDschAnalyListPath+"/dschdd"); if(sPid == "" && sDschDD == ""){ messageBox("Åð¿øÀÏÀÚ¸¦ ÀÔ·Â ÈÄ¿¡ Ãß°¡","I006"); return; } var sGridID = document.controls(pGrid); var ref = sGridID.attribute("nodeset"); sGridID.addRow(); var iRow = sGridID.rows - sGridID.fixedrows; model.setValue(ref+"["+iRow+"]/pid", sPid); model.setValue(ref+"["+iRow+"]/dschdd", sDschDD.split('-').join("")); //'-'¹®ÀÚ°¡ µé¾î°¡ ÀÖ´Â ¼ýÀÚÀÏ °æ¿ì '-'¹®ÀÚ¸¦ ºÐÇÒ(split())ÇÑ ´ÙÀ½¿¡ ´Ù½Ã °áÇÕ(join) } /** * @desc : ÁÙ »èÁ¦ * @id : * @event : xforms-select * @return : void * @authur : */ function fDelGridRow(pGrid){ var sGridID = document.controls(pGrid); var ref = sGridID.attribute("nodeset"); var iRow = sGridID.row; if(iRow < 1) return; var iStatus = sGridID.rowStatus(iRow); if(iStatus == 1 || iStatus == 3){ sGridID.deleteRow(iRow); }else{ sGridID.rowStatus(iRow) = 4; sGridID.deleteRow(iRow); } } /** * @desc : Ç׸ñº° ÀÔ·Â ¿©ºÎ üũ * @id : * @event : xforms-select * @return : void * @authur : */ function fCheckItemInputYN(pFlag){ // Ä¡·á°á°ú üũ if(pFlag == "curerslt" || pFlag == null){ var sCureRsltCD = model.getValue(xDschAnalyListPath+"/curersltcd"); if(sCureRsltCD == "07" || sCureRsltCD == "08"){ ipt_dethtype.disabled = false; cmb_dethtypecd.disabled = false; ipt_opdethtype.disabled = false; cmb_opdethtypecd.disabled = false; }else{ ipt_dethtype.disabled = true; cmb_dethtypecd.disabled = true; ipt_opdethtype.disabled = true; cmb_opdethtypecd.disabled = true; model.makeValue(xDschAnalyListPath+"/dethtype",""); model.makeValue(xDschAnalyListPath+"/dethtypecd",""); // 20081218 ¼öÁ¤ //ipt_dethtype.refresh(); //cmb_dethtypecd.refresh(); //ipt_opdethtype.refresh(); //cmb_opdethtypecd.refresh(); } } // ÀÔ¿ø°æ·Î üũ if(pFlag == "inpath"){ var sInPathCd = model.getValue(xDschAnalyListPath+"/inpathcd"); if(sInPathCd == "02"){ ipt_erchosdt.disabled = false; ipt_erstaytm.disabled = false; }else{ ipt_erchosdt.disabled = true; ipt_erstaytm.disabled = true; model.setValue(xDschAnalyListPath+"/erchosdt",""); model.setValue(xDschAnalyListPath+"/erstaytm",""); // 20081218 ¼öÁ¤ //ipt_erchosdt.refresh(); //ipt_erstaytm.refresh(); } } // ÀçÀÔ¿ø(Unplan) üũ if(pFlag == "reinresn" || pFlag == null){ var sReInResnCd = model.getValue(xDschAnalyListPath+"/reinresncd"); if(sReInResnCd != ""){ model.setValue(xDschAnalyListPath+"/reinyncd",""); model.setValue(xDschAnalyListPath+"/reinyn",""); ipt_reinyncd.disabled = true; cmb_reinyn.disabled = true; // 20081218 ¼öÁ¤ //ipt_reinyncd.refresh(); //cmb_reinyn.refresh(); }else{ ipt_reinyncd.disabled = false; cmb_reinyn.disabled = false; } } // ÀçÀÔ¿ø(plan) üũ if(pFlag == "reinyn" || pFlag == null){ var sReInYN = model.getValue(xDschAnalyListPath+"/reinyn"); if(sReInYN != ""){ model.setValue(xDschAnalyListPath+"/reinresncd",""); model.setValue(xDschAnalyListPath+"/reinresn",""); ipt_reinresn.disabled = true; cmb_reinresncd.disabled = true; // 20081218 ¼öÁ¤ //ipt_reinresn.refresh(); //cmb_reinresncd.refresh(); }else{ ipt_reinresn.disabled = false; cmb_reinresncd.disabled = false; } } } /** * @desc : ÀúÀå * @id : * @event : xforms-select * @return : void * @authur : */ function fSave() { //µî·Ï¹øÈ£ if(model.getValue(xDschAnalyListPath+"/pid") == ""){ messageBox("µî·Ï¹øÈ£´Â", "I003"); model.setFocus("ipt_pid"); return; } // Á¾±³ if(model.getValue(xDschAnalyListPath+"/religncd") == ""){ messageBox("Á¾±³´Â", "I003"); model.setFocus("cmb_religncd"); return; } // °áÈ¥»óÅ if(model.getValue(xDschAnalyListPath+"/marystatcd") == ""){ messageBox("°áÈ¥»óÅ´Â", "I003"); model.setFocus("cmb_marystatcd"); return; } // Á÷¾÷ if(model.getValue(xDschAnalyListPath+"/jobcd") == ""){ messageBox("Á÷¾÷Àº", "I003"); model.setFocus("cmb_jobcd"); return; } // Ä¡·á°á°ú if(model.getValue(xDschAnalyListPath+"/curersltcd") == ""){ messageBox("Ä¡·á°á°ú´Â", "I003"); model.setFocus("cmb_curersltcd"); return; } // Åð¿øÇüÅ if(model.getValue(xDschAnalyListPath+"/dschtypecd") == ""){ messageBox("Åð¿øÇüÅ´Â", "I003"); model.setFocus("cmb_dschtypecd"); return; } // ³»¿ø°æÀ§ if(model.getValue(xDschAnalyListPath+"/chosprogcd") == ""){ messageBox("³»¿ø°æÀ§´Â", "I003"); model.setFocus("cmb_chosprogcd"); return; } // ÀÔ¿ø°æ·Î if(model.getValue(xDschAnalyListPath+"/inpathcd") == ""){ messageBox("ÀÔ¿ø°æ·Î´Â", "I003"); model.setFocus("cmb_inpathcd"); return; } mmbfGetHardCodeInfoNm("/root/send/hardcode","/root/hidden/deptchklist", 4001); // 2009.06.06 ¹Ú¼ºÈ£ // ÀÔ¿ø,Åð¿ø°ú¿¡ ÇØ´çÇÏ´Â ºÐ°ú¸¦ ¼±Åà ¿©ºÎ üũ var DeptList = findNodeset(model, "/root/hidden/deptchklist/hardcd"); for(var idx = 0; idx < DeptList.length; idx++) { var DeptNode = model.getValue("/root/hidden/deptchklist/hardcd[" + (idx+1) + "]/hardcd"); var ChkYN = model.getValue("/root/hidden/deptchklist/hardcd[" + (idx+1) + "]/hardcdnm"); var indeptcd = model.getValue(xDschAnalyListPath+"/indeptcd"); var dschdeptcd = model.getValue(xDschAnalyListPath+"/dschdeptcd"); //alert("°ú:" + DeptNode + " :||| üũ¿©ºÎ:" + ChkYN); if (indeptcd == DeptNode) { if (ChkYN == "Y") { if(cmb_inclrsdeptcd.label==""){ messageBox(caption12.attribute("text")+" ºÐ°ú¸¦","C002"); model.setFocus("cmb_inclrsdeptcd"); return; } } } if (dschdeptcd == DeptNode) { if (ChkYN == "Y") { if(cmb_dschclrsdeptcd.label==""){ messageBox(caption23.attribute("text")+" ºÐ°ú¸¦","C002"); model.setFocus("cmb_dschclrsdeptcd"); return; } } } } /* //ÀÔ¿ø,Åð¿ø°ú¿¡ ÇØ´çÇÏ´Â ºÐ°ú¸¦ ¼±Åà ¿©ºÎ üũ var indeptcd = model.getValue(xDschAnalyListPath+"/indeptcd"); var dschdeptcd = model.getValue(xDschAnalyListPath+"/dschdeptcd"); if((indeptcd=="2010000000")||(indeptcd=="2040000000")||(indeptcd=="2100000000")||(indeptcd=="2110000000")){ if(cmb_inclrsdeptcd.label==""){ messageBox(caption12.attribute("text")+" ºÐ°ú¸¦","C002"); model.setFocus("cmb_inclrsdeptcd"); return; } } if((dschdeptcd=="2010000000")||(dschdeptcd=="2040000000")||(dschdeptcd=="2100000000")||(dschdeptcd=="2110000000")){ if(cmb_dschclrsdeptcd.label==""){ messageBox(caption23.attribute("text")+" ºÐ°ú¸¦","C002"); model.setFocus("cmb_dschclrsdeptcd"); return; } } */ //¼ö¼úÁ¤º¸¿¡¼­ ¸¶Ãë¹æ¹ý üũ ¿©ºÎ var anstmthdcd1 = model.getValue("/root/main/dschanalyhist/oplist["+grd_oplist.rows-grd_oplist.fixedrows+"]/anstmthdcd1"); var gnrlanstcnt = model.getValue("/root/main/dschanalyhist/dschanalyinfo/gnrlanstcnt"); var prtanstcnt = model.getValue("/root/main/dschanalyhist/dschanalyinfo/prtanstcnt"); var tpclanstcnt = model.getValue("/root/main/dschanalyhist/dschanalyinfo/tpclanstcnt"); if(getNodesetCnt(model,"/root/main/dschanalyhist/oplist")>0){ if(grd_oplist.valueMatrix(grd_oplist.rows-grd_oplist.fixedrows,grd_oplist.colRef("anstmthdcd1"))==""){ messageBox("¼ö¼úÁ¤º¸¿¡ ¸¶Ãë¹æ¹ýÀº ","I003"); return; } if(((gnrlanstcnt=="0")||(gnrlanstcnt==""))&&((prtanstcnt=="0")||(prtanstcnt==""))&&((tpclanstcnt=="0")||(tpclanstcnt==""))){ messageBox("¼ö¼úÁ¤º¸¿¡ Àü½Å,ºÎºÐ,±¹¼Ò °Ç¼ö¸¦ ","C001"); return; } } //Ä¡·á°á°ú¿¡ 48ÀÌÀü(ÈÄ)(07,08)»ç¸Á½Ã Åð¿øÇüŰ¡ »ç¸ÁÅð¿ø(06)ÀÎÁö üũ,¹Ý´ëµµ µ¿ÀÏ var curersltcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/curersltcd"); var dschtypecd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschtypecd"); if((curersltcd=="07")||(curersltcd=="08")){ if(dschtypecd!="06"){ messageBox("»ç¸ÁȯÀÚÀÏ °æ¿ì¿¡ Åð¿øÇüŸ¦ ","I007"); model.setFocus("cmb_dschtypecd"); return; } }else if((curersltcd!="07")||(curersltcd!="08")){ if(dschtypecd=="06"){ messageBox(cmb_dschtypecd.label+" ȯÀÚÀÏ °æ¿ì¿¡ Ä¡·á°á°ú¸¦ ","I007"); model.setFocus("cmb_curersltcd"); return; } } // ÀÔ¿øºÐ°ú³ª Åð¿øºÐ°úµç »ê°úÀ϶§ »ê¸ð/½Å»ý¾ÆÁ¤º¸°¡ ¾øÀ»½Ã üũ var inclrsdeptcd = model.getValue(xDschAnalyListPath+"/inclrsdeptcd"); var dschclrsdeptcd = model.getValue(xDschAnalyListPath+"/dschclrsdeptcd"); if((inclrsdeptcd =="2100600000")||(dschclrsdeptcd =="2100600000")){ if(getNodesetCnt(model,"/root/main/dschanalyhist/wnmblist")< 1){ messageBox("»ê¸ð / ½Å»ý¾ÆÁ¤º¸¸¦ ","C001"); return; } } // ÀÔ¿øºÐ°ú³ª Åð¿øºÐ°úµç »ê°úÀ϶§ »ê¸ð/½Å»ý¾ÆÁ¤º¸¿¡ »ê¸ðÇüÅ× ¹ÌÀԷ½à üũ if((inclrsdeptcd =="2100600000")||(dschclrsdeptcd =="2100600000")){ if(grd_wnmblist.valueMatrix(grd_wnmblist.rows-grd_wnmblist.fixedrows+1,grd_wnmblist.colRef("womntypecd"))==""){ messageBox("»ê¸ð / ½Å»ý¾ÆÁ¤º¸¿¡ »ê¸ðÇüŸ¦ ","C001"); return; } } // Á¶È¸ÇÑ µî·Ï¹øÈ£¶û ÀúÀåÇÒ µî·Ï¹øÈ£ ÀÏÄ¡ ¿©ºÎ if(model.getValue("/root/main/dschanalyhist/dschanalyinfo/pid")!=(model.getValue(xPatBaseInfoListPath+"/pid"))){ messageBox("Á¶È¸ÇÑ µî·Ï¹øÈ£¶û ÀúÀåÇÒ µî·Ï¹øÈ£°¡ ","E004"); model.setFocus("ipt_pid"); return; } var inrmdd= model.getValue(xDschAnalyListPath+"/inrmdd"); var inrmDD = inrmdd.replace("-","") ; model.setValue(xDschAnalyListPath+"/inrmdd",inrmDD); var dschdd= model.getValue(xDschAnalyListPath+"/dschdd"); if(dschdd.indexOf("-")> 0){ model.makeValue(xDschAnalyListPath+"/dschdd",dschdd.split('-').join("")); } // 2012/10/17 Start var rows = grd_cnstlist.rows-grd_cnstlist.fixedRows; // Çù·ÂÀÇ·ÚÀÇ ÀÇ·Ú°ú°¡ ¼Ò¾ÆÃ»¼Ò³â°ú ¶Ç´Â »êºÎÀΰúÀÏ °æ¿ì ÀǷںаú¸¦ Çʼö·Î ÀÔ·ÂÅä·Ï ¼öÁ¤ for(var i=1; i<=rows; i++){ var reqdept = model.getValue("/root/main/dschanalyhist/cnstlist[" + i + "]/reqdeptcd"); if(reqdept=="2110000000" || reqdept=="2100000000"){ if(model.getValue("/root/main/dschanalyhist/cnstlist[" + i + "]/reqclrsdeptcd")==""){ messageBox("ÀÇ·Ú°ú°¡ ¼Ò¾ÆÃ»¼Ò³â°ú ¶Ç´Â »êºÎÀΰúÀÏ °æ¿ì ÀǷںаú´Â", "I003"); return; } } // Çù·ÂÀÇ·ÚÀÇ È¸½Å°ú°ú ¼Ò¾ÆÃ»¼Ò³â°ú ¶Ç´Â »êºÎÀΰúÀÏ °æ¿ì ȸ½ÅºÐ°ú¸¦ Çʼö·Î ÀÔ·ÂÅä·Ï ¼öÁ¤ var ansdept = model.getValue("/root/main/dschanalyhist/cnstlist[" + i + "]/execdeptcd"); if(ansdept=="2110000000" || ansdept=="2100000000"){ if(model.getValue("/root/main/dschanalyhist/cnstlist[" + i + "]/execlrsdeptcd")==""){ messageBox("ȸ½Å°ú°¡ ¼Ò¾ÆÃ»¼Ò³â°ú ¶Ç´Â »êºÎÀΰúÀÏ °æ¿ì ȸ½ÅºÐ°ú´Â", "I003"); return; } } } // Åð¿øÇüŰ¡ »ç¸ÁÅð¿øÀÎ °æ¿ì »ç¸ÁÇüÅ´ Çʼö·Î ÀÔ·ÂÅä·Ï ¼öÁ¤ if(model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschtypecd")=="06"){ if(model.getValue("/root/main/dschanalyhist/dschanalyinfo/dethtypecd")==""){ messageBox("Åð¿øÇüŰ¡ »ç¸ÁÅð¿øÀÎ °æ¿ì »ç¸ÁÇüÅ´Â", "I003"); return; } } // 2012/10/17 End // 2013/01/07 Start var rows = grd_oplist.rows-grd_oplist.fixedRows; // ¼ö¼úÁ¤º¸ÀÇ ¼ö¼ú°ú°¡ ¼Ò¾ÆÃ»¼Ò³â°ú ¶Ç´Â »êºÎÀΰú ÀÏ °æ¿ì ¼ö¼úºÐ°ú´Â Çʼö·Î ÀÔ·ÂÅä·Ï ¼öÁ¤ for(var i=1; i<=rows; i++){ var perfdeptcd = model.getValue("/root/main/dschanalyhist/oplist[" + i + "]/perfdeptcd"); if(perfdeptcd=="2110000000" || perfdeptcd=="2100000000"){ if(model.getValue("/root/main/dschanalyhist/oplist[" + i + "]/opclrsdeptcd")==""){ messageBox("¼ö¼ú°ú°¡ ¼Ò¾ÆÃ»¼Ò³â°ú ¶Ç´Â »êºÎÀΰúÀÏ °æ¿ì ¼ö¼úºÐ°ú´Â", "I003"); return; } } } var inpath=model.getValue("/root/main/dschanalyhist/dschanalyinfo/inpath"); if(inpath=="01"){ // ÀÔ¿ø°æ·Î°¡ ¿Ü·¡Àϰæ¿ì var erchosdt=model.getValue("/root/main/dschanalyhist/dschanalyinfo/erchosdt"); //ER³»¿øÀϽà var erstaytm=model.getValue("/root/main/dschanalyhist/dschanalyinfo/erstaytm"); //ERü·ù½Ã°£ if(erchosdt!="" || erstaytm!=""){ messageBox("ÀÔ¿ø°æ·Î°¡ ¿Ü·¡ÀÎ °æ¿ì ER³»¿øÀϽà ¶Ç´Â ERü·ù½Ã°£Àº\n ÀÔ·ÂÇÒ ¼ö", "I004"); return; } }else if(inpath=="02"){ // ÀÔ¿ø°æ·Î°¡ ÀÀ±Þ½ÇÀϰæ¿ì var erchosdt=model.getValue("/root/main/dschanalyhist/dschanalyinfo/erchosdt"); //ER³»¿øÀϽà var erstaytm=model.getValue("/root/main/dschanalyhist/dschanalyinfo/erstaytm"); //ERü·ù½Ã°£ if(erchosdt==""){ messageBox("ÀÔ¿ø°æ·Î°¡ ÀÀ±Þ½ÇÀÎ °æ¿ì ER³»¿øÀϽôÂ", "I003"); return; } } // 2013/01/07 End // 2013/01/08 Start var deptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschdeptcd"); var clrsdeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschclrsdeptcd"); var womnid=model.getValue("/root/main/dschanalyhist/wnmblist/womnid"); var nbabyflag=model.getValue("/root/main/dschanalyhist/wnmblist/nbabyflag"); if(deptcd=="2110000000" && clrsdeptcd!=""){ // ¼Ò¾ÆÃ»¼Ò³â°úÀ̸鼭 ºÐ°ú°¡ Á¸ÀçÇÒ ½Ã¿¡ var nodecnt = getNodesetCount("/root/main/dschanalyhist/wnmblist"); var womnid=model.getValue("/root/main/dschanalyhist/wnmblist/womnid"); if(nodecnt > 0 && womnid!="" && nbabyflag==""){ // »ê¸ð¹øÈ£°¡ Á¸Àç½Ã messageBox("»ê¸ð/½Å»ý¾Æ Á¤º¸¸¦ È®ÀÎ ÈÄ", "C003"); return; }else if(nodecnt > 0 && womnid=="" && nbabyflag!="" && nbabyflag!="-"){// »ê¸ð¹øÈ£°¡ Á¸ÀçÇÏÁö ¾ÊÀ»½Ã messageBox("»ê¸ð/½Å»ý¾Æ Á¤º¸¸¦ È®ÀÎ ÈÄ", "C003"); return; } } // 2013/01/08 End var dethdd = model.getValue("/root/main/patdethinfo/patdethlist/dethdd"); var dethtm = model.getValue("/root/main/patdethinfo/patdethlist/dethtm"); dethtm = dethtm.substr(0,4); var dschtm = model.getValue("/root/send/dschtm"); if(dethtm == " "){ dethtm = ""; } if(dschtm == " "){ dschtm = ""; } var dethddtm = dethdd + dethtm; var dschddtm = dschdd + dschtm; // 2013.09.23 CYW START var patdethcnt = getNodesetCount("/root/main/patdethinfo/patdethlist"); if( patdethcnt > 0 ){ var dethdd = model.getValue("/root/main/patdethinfo/patdethlist/dethdd"); // »ç¸ÁÀÏÀÚ°¡ Åð¿øÀÏ ÀÌÈÄÀÎ °æ¿ì Á¦¿Ü //if( dschdd >= dethdd ){ if( dschddtm >= dethddtm ){ if(dschtypecd!="06"){ messageBox("»ç¸Áµî·ÏµÈ ȯÀÚÀÔ´Ï´Ù! Åð¿øÇüŸ¦ ","I007"); model.setFocus("cmb_dschtypecd"); return; } if( curersltcd != "07" && curersltcd != "08"){ messageBox("»ç¸Áµî·ÏµÈ ȯÀÚÀÔ´Ï´Ù! Ä¡·á°á°ú¸¦ ","I007"); model.setFocus("cmb_curersltcd"); return; } } } // »ç¸Áµî·ÏµÈ ȯÀÚÀÔ´Ï´Ù! Ä¡·á°á°ú/Åð¿øÇüÅ ÀçÈ®ÀÎ ¹Ù¶ø´Ï´Ù. // 2013.09.23 END //////////////////////////////////////////////////////////////////////// // Åð¿øºÐ¼® ¹ÌºñºÐ°ú ¼³Á¤ fSetUnPrepDetlDeptInfo(); //////////////////////////////////////////////////////////////////////// model.removeNodeset("/root/send"); model.makeNode("/root/send/dschanalyinfo"); model.copyNode("/root/send/dschanalyinfo", xDschAnalyListPath); model.makeValue("/root/send/oplist", grd_oplist.getUpdateData()); // ¼ö¼ú³»¿ª model.makeValue("/root/send/cnstlist", grd_cnstlist.getUpdateData()); // ÇùÀÇÁø´Ü model.makeValue("/root/send/wnmblist", grd_wnmblist.getUpdateData()); // »ê¸ð/½Å»ý¾Æ model.makeValue("/root/send/chngdeptlist", grd_chngdeptlist.getUpdateData()); // Àü°úÁ¤º¸ model.makeValue("/root/send/iculist", grd_iculist.getUpdateData()); // ÁßȯÀÚ½Ç model.makeValue("/root/send/detldeptcdinfo", grd_detldeptlist.getUpdateData()); // ¹ÌºñºÐ°úÁ¤º¸ // model.makeValue("/root/send/infdislist", grd_infdislist.getUpdateData()); // Àü¿°º´2008-11-23 »ç¿ëÀÚ ¿ä±¸¿¡ µû¶ó ¸·À½(ÀÌâ·Ï) var sIndxInfo = model.getValue(xDschAnalyListPath+"/indxinfo").getTrim().split(" "); var sSaveData = "status¢Ëkpicd¢Ëdsqino¢Ëpid¢Ëdschdd¢Ì"; var indxCnt = 0; var kpicd = ""; if(sIndxInfo.length > 0){ for(var i=0; i 0){ for(var iRow=1; iRow <= indxCnt; iRow++){ kpicd = model.getValue("/root/main/dschanalyhist/indxlist["+iRow+"]/kpicd"); if(model.getValue(xDschAnalyListPath+"/indxinfo").indexOf(kpicd) == -1){ sSaveData += "d¢Ë" + kpicd+"¢Ë" + model.getValue("/root/main/dschanalyhist/indxlist["+iRow+"]/dsqino")+"¢Ë" + model.getValue("/root/main/dschanalyhist/indxlist["+iRow+"]/pid")+"¢Ë" + model.getValue("/root/main/dschanalyhist/indxlist["+iRow+"]/dschdd")+"¢Ì"; } } } model.makeValue("/root/send/indxlist", sSaveData); // Àü¿°º´ if(submit("TXMRD00401")){ messageBox("ÀúÀå","I002"); // ÀÔ·Â ¿©ºÎ üũ fCheckItemInputYN(); //model.refresh(); // ÁßȯÀÚ½Ç Àüü Àç¿øÀϼö model.removeNodeset("/root/main/dschanalyhist/icutotlist"); grd_icutotlist.refresh(); if(grd_iculist.rows > grd_iculist.fixedrows){ var sTotInHospDayNo = 0; var iRow = 0; var iICUTotRow = 0; var sICUCd = ""; for(var iStndRow = grd_iculist.fixedrows; iStndRow<=(grd_iculist.rows-grd_iculist.fixedrows); iStndRow++){ sICUCd = model.getValue("/root/main/dschanalyhist/iculist["+iStndRow+"]/icucd"); iICUTotRow = grd_icutotlist.findRow(sICUCd, grd_icutotlist.fixedrows, 1); sTotInHospDayNo = 0; if(iICUTotRow < 1){ for(var iRow = grd_iculist.fixedrows; iRow <= (grd_iculist.rows-grd_iculist.fixedrows); iRow++){ if(model.getValue("/root/main/dschanalyhist/iculist["+iRow+"]/icucd") == sICUCd){ sInHospDayNo = model.getValue("/root/main/dschanalyhist/iculist["+iRow+"]/inhospdayno"); if(sInHospDayNo == "") sInHospDayNo = 0; sTotInHospDayNo += eval(sInHospDayNo); } } grd_icutotlist.addRow(); iRow = grd_icutotlist.rows - grd_icutotlist.fixedrows; model.setValue(xICUTotListPath+"["+iRow+"]/deptcd",sICUCd); model.setValue(xICUTotListPath+"["+iRow+"]/totinhospdayno", sTotInHospDayNo); } } } if(model.getValue(xDschAnalyListPath+"/status") == "u"){ dPid = model.getValue("/root/main/dschanalyhist/dschanalyinfo/pid"); dDschdd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschdd"); sDschDD = dDschdd.substr(0,4)+"/"+dDschdd.substr(4,2)+"/"+dDschdd.substr(6,2) model.setValue("/root/main/cond/statcnts",dPid+"ȯÀÚÀÇ"+sDschDD+"ÀÇ Åð¿øºÐ¼®ÀÌ µÇ¾î ÀÖ½À´Ï´Ù."); model.makeValue("/root/main/detldeptcdsaveyn", "N"); // model.refresh(); } model.copyNode("/root/temp/dschanalyhist", "/root/main/dschanalyhist"); model.setValue("/root/main/dschanalyhist/dschanalyinfo/pid", ""); model.setFocus("ipt_pid"); } model.refresh(); } /** * @desc : Áø´Ü °Ë»ö ÆË¾÷ * @id : * @event : xforms-select * @return : void * @authur : */ function fPopUpDiag(pGrid, srchCol, rsltCol){ var sGridID = document.controls(pGrid); var ref = sGridID.attribute("nodeset"); var iRow = sGridID.row; var sRtnMsg = ""; model.setFocus(pGrid); if(sGridID.valueMatrix(iRow,srchCol) == "") return; setParameter ( "SPMMO00800_cond1" , "1" ); setParameter ( "SPMMO00800_cond2" , "1" ); setParameter ( "SPMMO00800_cond3" , "H" ); setParameter ( "SPMMO00800_cond4" , model.getValue(xDschAnalyListPath+"/dschdd")); setParameter ( "SPMMO00800_cond5" , sGridID.valueMatrix(iRow,srchCol)); modal("SPMMO00800"); sRtnMsg = getParameter("SPMMO00800_rtn"); if(sRtnMsg != ""){ sGridID.valueMatrix(iRow,srchCol) = getArrayData(sRtnMsg,1,1,"¢Ì","¢Ë"); sGridID.valueMatrix(iRow,rsltCol) = getArrayData(sRtnMsg,1,2,"¢Ì","¢Ë"); } } /** * @desc : »ç¿ëÀÚ °Ë»ö ÆË¾÷ * @id : * @event : xforms-select * @return : void * @authur : ¼öÁ¤ ->ÀÌâ·Ï 2008-10-10 12:29¿ÀÀü */ function fPopUpUserInfo(pGrid,srchCol,rsltCol){ var sGridID = document.controls(pGrid); var ref = sGridID.attribute("nodeset"); var iRow = sGridID.row; var sKeyNo = 0; // °¢ ±×¸®µåÀÇ key var opdd = model.getValue("/root/main/dschanalyhist/oplist["+iRow+"]/opdd"); //¼ö¼úÀÏÀÚ var reqdd = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqdd");//ÀÇ·ÚÀÏ var execdd = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execdd");//½ÃÇàÀÏ var chngdeptdd = model.getValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngdeptdd");//ÀüÃâÀÏ model.setFocus(pGrid); setParameter("reqflag", "usernm"); setParameter("usernm", sGridID.valueMatrix(iRow,srchCol)); if(pGrid=="grd_oplist"){ setParameter("stnddd", opdd); }else if(("grd_cnstlist")&&(srchCol==5)){ setParameter("stnddd", reqdd); }else if(("grd_cnstlist")&&(srchCol==11)){ setParameter("stnddd", execdd); }else if(pGrid=="grd_chngdeptlist"){ setParameter("stnddd", chngdeptdd); } setParameter("autortnyn","Y"); model.resetInstanceNode("/root/temp/userinfo"); modal("SPMRF03200"); sGridID.valueMatrix(iRow,rsltCol) = model.getValue("/root/temp/userinfo/userid"); sGridID.valueMatrix(iRow,srchCol) = model.getValue("/root/temp/userinfo/usernm"); if(model.getValue("/root/temp/userinfo/userid") == "") return false; else return true; } /** * @desc : »ç¿ëÀÚ Á¤º¸ ¾ò±â * @id : * @event : xforms-select * @return : void * @authur : */ function fGetUserInfo(userid,usernm,deptcd ,instcd){ model.setValue("/root/temp/userinfo/userid", userid); model.setValue("/root/temp/userinfo/usernm", usernm.getTrim()); model.setValue("/root/temp/userinfo/deptcd", deptcd); model.setValue("/root/temp/userinfo/instcd", instcd); } /** * @ver : 2008-08-25 * @desc : °¨¿°Á¾·ù1ÀÇ °¨¿°Á¾·ù2ÀÇ ÇϺÎÇ׸ñµé Á¶È¸ * @by : ÀÌâ·Ï * @param : * @return : * @--------------------------------------------------- */ function fGetInFcCas(code){ switch(code){ case "01": zbcfGetCodeList(new Array("M0485"), new Array("/root/hidden/infdcpartinfo/infdcpartlist")); copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0485"); break; case "02": zbcfGetCodeList(new Array("M0486"), new Array("/root/hidden/infdcpartinfo/infdcpartlist")); copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0486"); break; case "03": zbcfGetCodeList(new Array("M0487"), new Array("/root/hidden/infdcpartinfo/infdcpartlist")); copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0487"); break; case "04": zbcfGetCodeList(new Array("M0488"),new Array("/root/hidden/infdcpartinfo/infdcpartlist")); copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0488"); break; case "05": zbcfGetCodeList(new Array("M0489"), new Array("/root/hidden/infdcpartinfo/infdcpartlist")); copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0489"); break; case "06": zbcfGetCodeList(new Array("M0490"), new Array("/root/hidden/infdcpartinfo/infdcpartlist")); copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0490"); break; case "07": zbcfGetCodeList(new Array("M0491"), new Array("/root/hidden/infdcpartinfo/infdcpartlist")); copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0491"); break; case "08": zbcfGetCodeList(new Array("M0492"), new Array("/root/hidden/infdcpartinfo/infdcpartlist")); copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0492"); break; case "09": zbcfGetCodeList(new Array("M0493"), new Array("/root/hidden/infdcpartinfo/infdcpartlist")); copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0493"); break; case "10": zbcfGetCodeList(new Array("M0494"), new Array("/root/hidden/infdcpartinfo/infdcpartlist")); copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0494"); break; case "11": zbcfGetCodeList(new Array("M0495"), new Array("/root/hidden/infdcpartinfo/infdcpartlist")); copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0495"); break; case "12": zbcfGetCodeList(new Array("M0496"), new Array("/root/hidden/infdcpartinfo/infdcpartlist")); copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0496"); break; case "13": zbcfGetCodeList(new Array("M0497"), new Array("/root/hidden/infdcpartinfo/infdcpartlist")); copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0497"); break; } // 20081218 ¼öÁ¤ //model.refresh(); model.removeNodeset("/root/hidden/infdcpartinfo/infdcpartlist"); model.makeNode("/root/hidden/infdcpartinfo/infdcpartlist"); } /** * @ver : 2008-10-30 * @desc : ÀÔ¿ø°ú ¹× Åð¿ø°ú ºÐ°ú Á¶È¸ * @by : ÀÌâ·Ï * @param : * @return : * @--------------------------------------------------- */ function fInDschClrsDeptSearch(flag) { var sDschDD = model.getValue(xDschAnalyListPath+"/dschdd"); var sInDD = model.getValue("/root/temp/patinfo/chgdschddlist[dschdd='"+sDschDD+"']/indd"); if(flag=="dsch"){ model.removeNodeset("/root/hidden/dschclrsinfo/dschclrsdeptlist"); model.makeNode("/root/hidden/dschclrsinfo/dschclrsdeptlist"); var deptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschdeptcd"); switch(deptcd){ case "2010000000": zbcfGetCodeList(new Array("M0500"), new Array("/root/tmp/hidden/dschclrsdeptlist")); copyNodeset("/root/hidden/dschclrsinfo/dschclrsdeptlist", "/root/tmp/hidden/dschclrsdeptlist/M0500"); break; case "2040000000": //2010.03.31. ÀÌÀº¿µ : Åð¿øÀÏÀÚ ±âÁØÀ¸·Î ºÐ°úÁ¤º¸ °¡Á®¿È. (¼­¿ï¼º¸ð¸¸ - ¿Ü°úºÐ°ú ¶§¹®¿¡ Åð¿øÀÏ ±âÁØÀ¸·Î ºÐ°úÄڵ带 °¡Á®¿È.) if (getUserInfo("dutplceinstcd") == "000") { model.makeValue("/root/send/gsdeptcd", "2040000000"); model.makeValue("/root/send/stndd", sDschDD); submit("TRMRD00417"); copyNodeset("/root/hidden/dschclrsinfo/dschclrsdeptlist", "/root/init/gsclrsinfo/gsclrsdeptlist"); } else { zbcfGetCodeList(new Array("M0501"), new Array("/root/tmp/hidden/dschclrsdeptlist")); copyNodeset("/root/hidden/dschclrsinfo/dschclrsdeptlist", "/root/tmp/hidden/dschclrsdeptlist/M0501"); } break; case "2100000000": zbcfGetCodeList(new Array("M0502"), new Array("/root/tmp/hidden/dschclrsdeptlist")); copyNodeset("/root/hidden/dschclrsinfo/dschclrsdeptlist", "/root/tmp/hidden/dschclrsdeptlist/M0502"); break; case "2110000000": zbcfGetCodeList(new Array("M0503"),new Array("/root/tmp/hidden/dschclrsdeptlist")); copyNodeset("/root/hidden/dschclrsinfo/dschclrsdeptlist", "/root/tmp/hidden/dschclrsdeptlist/M0503"); break; } model.removeNodeset("/root/tmp/hidden/dschclrsdeptlist"); model.makeNode("/root/tmp/hidden/dschclrsdeptlist"); }else if(flag=="indd"){ model.removeNodeset("/root/hidden/inclrsinfo/inclrsdeptlist"); model.makeNode("/root/hidden/inclrsinfo/inclrsdeptlist"); var deptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/indeptcd"); switch(deptcd){ case "2010000000": zbcfGetCodeList(new Array("M0500"), new Array("/root/tmp/hidden/inclrsdeptlist")); copyNodeset("/root/hidden/inclrsinfo/inclrsdeptlist", "/root/tmp/hidden/inclrsdeptlist/M0500"); break; case "2040000000": //2010.03.31. ÀÌÀº¿µ : Åð¿øÀÏÀÚ ±âÁØÀ¸·Î ºÐ°úÁ¤º¸ °¡Á®¿È. (¼­¿ï¼º¸ð¸¸ - ¿Ü°úºÐ°ú ¶§¹®¿¡ Åð¿øÀÏ ±âÁØÀ¸·Î ºÐ°úÄڵ带 °¡Á®¿È.) if (getUserInfo("dutplceinstcd") == "000") { model.makeValue("/root/send/gsdeptcd", "2040000000"); model.makeValue("/root/send/stndd", sInDD); submit("TRMRD00417"); copyNodeset("/root/hidden/inclrsinfo/inclrsdeptlist", "/root/init/gsclrsinfo/gsclrsdeptlist"); } else { zbcfGetCodeList(new Array("M0501"), new Array("/root/tmp/hidden/inclrsdeptlist")); copyNodeset("/root/hidden/inclrsinfo/inclrsdeptlist", "/root/tmp/hidden/inclrsdeptlist/M0501"); } break; case "2100000000": zbcfGetCodeList(new Array("M0502"), new Array("/root/tmp/hidden/inclrsdeptlist")); copyNodeset("/root/hidden/inclrsinfo/inclrsdeptlist", "/root/tmp/hidden/inclrsdeptlist/M0502"); break; case "2110000000": zbcfGetCodeList(new Array("M0503"),new Array("/root/tmp/hidden/inclrsdeptlist")); copyNodeset("/root/hidden/inclrsinfo/inclrsdeptlist", "/root/tmp/hidden/inclrsdeptlist/M0503"); break; } model.removeNodeset("/root/tmp/hidden/inclrsdeptlist"); model.makeNode("/root/tmp/hidden/inclrsdeptlist"); } // 20081218 ¼öÁ¤ //model.refresh(); } function fOpGridStatusChg() { var iRow = grd_oplist.row; var iCol = grd_oplist.col; var iStatus = grd_oplist.rowStatus(iRow); var sDsopNo = ""; if(iCol != 7 && iStatus == 2){ sDsopNo = model.getValue("/root/main/dschanalyhist/oplist["+iRow+"]/dsopno"); if(instance1.selectSingleNode("/root/main/dschanalyhist/oplist["+iRow+"]").xml == instance1.selectSingleNode("/root/temp/dschanalyhist/oplist[dsopno='"+sDsopNo+"']").xml){ grd_oplist.rowStatus(iRow) = 0; } } } /** * @ver : 2008-12-07 * @desc : ÀÔ¿ø°ú ¹× Åð¿ø°ú ºÐ°ú ¼±Åýà ±×¸®µå ºÐ°ú º¯°æ * @by : ÀÌâ·Ï * @param : * @return : * @--------------------------------------------------- */ function fClrsDeptSelected(flag) { if(flag =="dsch"){ // ¼ö¼ú³»¿ª for(var iRow = grd_oplist.fixedrows; iRow <= grd_oplist.rows-grd_oplist.fixedrows; iRow++){ var perfdeptcd = model.getValue("/root/main/dschanalyhist/oplist["+iRow+"]/perfdeptcd"); var dschdeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschdeptcd"); var iStatus = grd_oplist.rowStatus(iRow); if(dschdeptcd==perfdeptcd){ if((perfdeptcd=="2010000000")||(perfdeptcd=="2040000000")||(perfdeptcd=="2100000000")||(perfdeptcd=="2110000000")){ model.makeValue("/root/main/dschanalyhist/oplist["+iRow+"]/opclrsdeptcd",model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschclrsdeptcd")); if(iStatus == 0){ grd_oplist.rowStatus(iRow) = 2; }else if(iStatus == 2){ var sDsopNo = model.getValue("/root/main/dschanalyhist/oplist["+iRow+"]/dsopno"); if(instance1.selectSingleNode("/root/main/dschanalyhist/oplist["+iRow+"]").xml == instance1.selectSingleNode("/root/temp/dschanalyhist/oplist[dsopno='"+sDsopNo+"']").xml){ grd_oplist.rowStatus(iRow) = 0; } } } } } // 20081218 ¼öÁ¤ //grd_oplist.refresh(); // ÇùÀÇÁø´Ü for(var iRow = grd_cnstlist.fixedrows; iRow <= grd_cnstlist.rows-grd_cnstlist.fixedrows; iRow++){ var reqdeptcd = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqdeptcd"); var execdeptcd = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execdeptcd"); var dschdeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschdeptcd"); var iStatus = grd_cnstlist.rowStatus(iRow); if(dschdeptcd==reqdeptcd){ if((reqdeptcd=="2010000000")||(reqdeptcd=="2040000000")||(reqdeptcd=="2100000000")||(reqdeptcd=="2110000000")){ model.makeValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqclrsdeptcd",model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschclrsdeptcd")); if(iStatus == 0){ grd_cnstlist.rowStatus(iRow) = 2; }else if(iStatus == 2){ var sDscnstNo = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/dscnstno"); if(instance1.selectSingleNode("/root/main/dschanalyhist/cnstlist["+iRow+"]").xml == instance1.selectSingleNode("/root/temp/dschanalyhist/cnstlist[dscnstno='"+sDscnstNo+"']").xml){ grd_cnstlist.rowStatus(iRow) = 0; } } } } if(dschdeptcd==execdeptcd){ if((execdeptcd=="2010000000")||(execdeptcd=="2040000000")||(execdeptcd=="2100000000")||(execdeptcd=="2110000000")){ model.makeValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execlrsdeptcd",model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschclrsdeptcd")); if(iStatus == 0){ grd_cnstlist.rowStatus(iRow) = 2; }else if(iStatus == 2){ var sDscnstNo = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/dscnstno"); if(instance1.selectSingleNode("/root/main/dschanalyhist/cnstlist["+iRow+"]").xml == instance1.selectSingleNode("/root/temp/dschanalyhist/cnstlist[dscnstno='"+sDscnstNo+"']").xml){ grd_cnstlist.rowStatus(iRow) = 0; } } } } } // 20081218 ¼öÁ¤ //grd_cnstlist.refresh(); // Àü°úÁ¤º¸ for(var iRow = grd_chngdeptlist.fixedrows; iRow <= grd_chngdeptlist.rows-grd_chngdeptlist.fixedrows; iRow++){ var chngdeptcd = model.getValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngdeptcd"); var dschdeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschdeptcd"); var iStatus = grd_chngdeptlist.rowStatus(iRow); if(dschdeptcd==chngdeptcd){ if((chngdeptcd=="2010000000")||(chngdeptcd=="2040000000")||(chngdeptcd=="2100000000")||(chngdeptcd=="2110000000")){ model.makeValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngclrsdeptcd",model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschclrsdeptcd")); if(iStatus == 0){ grd_chngdeptlist.rowStatus(iRow) = 2; }else if(iStatus == 2){ var sDscdNo = model.getValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/dscdno"); if(instance1.selectSingleNode("/root/main/dschanalyhist/chngdeptlist["+iRow+"]").xml == instance1.selectSingleNode("/root/temp/dschanalyhist/chngdeptlist[dscdno='"+sDscdNo+"']").xml){ grd_chngdeptlist.rowStatus(iRow) = 0; } } } } } // 20081218 ¼öÁ¤ //grd_chngdeptlist.refresh(); // ÁßȯÀÚ½Ç for(var iRow = grd_iculist.fixedrows; iRow <= grd_iculist.rows-grd_iculist.fixedrows; iRow++){ var orddeptcd = model.getValue("/root/main/dschanalyhist/iculist["+iRow+"]/orddeptcd"); var dschdeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschdeptcd"); var iStatus = grd_iculist.rowStatus(iRow); if(dschdeptcd==orddeptcd){ if((orddeptcd=="2010000000")||(orddeptcd=="2040000000")||(orddeptcd=="2100000000")||(orddeptcd=="2110000000")){ model.makeValue("/root/main/dschanalyhist/iculist["+iRow+"]/ordclrsdeptcd",model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschclrsdeptcd")); if(iStatus == 0){ grd_iculist.rowStatus(iRow) = 2; }else if(iStatus == 2){ var sDsicuNo = model.getValue("/root/main/dschanalyhist/iculist["+iRow+"]/dsicuno"); if(instance1.selectSingleNode("/root/main/dschanalyhist/iculist["+iRow+"]").xml == instance1.selectSingleNode("/root/temp/dschanalyhist/iculist[dsicuno='"+sDsicuNo+"']").xml){ grd_iculist.rowStatus(iRow) = 0; } } } } } // 20081218 ¼öÁ¤ //grd_iculist.refresh(); }else if(flag =="in"){ // ¼ö¼ú³»¿ª for(var iRow = grd_oplist.fixedrows; iRow <= grd_oplist.rows-grd_oplist.fixedrows; iRow++){ var perfdeptcd = model.getValue("/root/main/dschanalyhist/oplist["+iRow+"]/perfdeptcd"); var indeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/indeptcd"); var iStatus = grd_oplist.rowStatus(iRow); if(indeptcd==perfdeptcd){ if((perfdeptcd=="2010000000")||(perfdeptcd=="2040000000")||(perfdeptcd=="2100000000")||(perfdeptcd=="2110000000")){ model.makeValue("/root/main/dschanalyhist/oplist["+iRow+"]/opclrsdeptcd",model.getValue("/root/main/dschanalyhist/dschanalyinfo/inclrsdeptcd")); if(iStatus == 0){ grd_oplist.rowStatus(iRow) = 2; }else if(iStatus == 2){ var sDsopNo = model.getValue("/root/main/dschanalyhist/oplist["+iRow+"]/dsopno"); if(instance1.selectSingleNode("/root/main/dschanalyhist/oplist["+iRow+"]").xml == instance1.selectSingleNode("/root/temp/dschanalyhist/oplist[dsopno='"+sDsopNo+"']").xml){ grd_oplist.rowStatus(iRow) = 0; } } } } } // 20081218 ¼öÁ¤ //grd_oplist.refresh(); // ÇùÀÇÁø´Ü for(var iRow = grd_cnstlist.fixedrows; iRow <= grd_cnstlist.rows-grd_cnstlist.fixedrows; iRow++){ var reqdeptcd = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqdeptcd"); var execdeptcd = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execdeptcd"); var indeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/indeptcd"); var iStatus = grd_cnstlist.rowStatus(iRow); if(indeptcd==reqdeptcd){ if((reqdeptcd=="2010000000")||(reqdeptcd=="2040000000")||(reqdeptcd=="2100000000")||(reqdeptcd=="2110000000")){ model.makeValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqclrsdeptcd",model.getValue("/root/main/dschanalyhist/dschanalyinfo/inclrsdeptcd")); if(iStatus == 0){ grd_cnstlist.rowStatus(iRow) = 2; }else if(iStatus == 2){ var sDscnstNo = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/dscnstno"); if(instance1.selectSingleNode("/root/main/dschanalyhist/cnstlist["+iRow+"]").xml == instance1.selectSingleNode("/root/temp/dschanalyhist/cnstlist[dscnstno='"+sDscnstNo+"']").xml){ grd_cnstlist.rowStatus(iRow) = 0; } } } } if(indeptcd==execdeptcd){ if((execdeptcd=="2010000000")||(execdeptcd=="2040000000")||(execdeptcd=="2100000000")||(execdeptcd=="2110000000")){ model.makeValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execlrsdeptcd",model.getValue("/root/main/dschanalyhist/dschanalyinfo/inclrsdeptcd")); if(iStatus == 0){ grd_cnstlist.rowStatus(iRow) = 2; }else if(iStatus == 2){ var sDscnstNo = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/dscnstno"); if(instance1.selectSingleNode("/root/main/dschanalyhist/cnstlist["+iRow+"]").xml == instance1.selectSingleNode("/root/temp/dschanalyhist/cnstlist[dscnstno='"+sDscnstNo+"']").xml){ grd_cnstlist.rowStatus(iRow) = 0; } } } } } // 20081218 ¼öÁ¤ //grd_cnstlist.refresh(); // Àü°úÁ¤º¸ for(var iRow = grd_chngdeptlist.fixedrows; iRow <= grd_chngdeptlist.rows-grd_chngdeptlist.fixedrows; iRow++){ var chngdeptcd = model.getValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngdeptcd"); var indeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/indeptcd"); var iStatus = grd_chngdeptlist.rowStatus(iRow); if(indeptcd==chngdeptcd){ if((chngdeptcd=="2010000000")||(chngdeptcd=="2040000000")||(chngdeptcd=="2100000000")||(chngdeptcd=="2110000000")){ model.makeValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngclrsdeptcd",model.getValue("/root/main/dschanalyhist/dschanalyinfo/inclrsdeptcd")); if(iStatus == 0){ grd_chngdeptlist.rowStatus(iRow) = 2; }else if(iStatus == 2){ var sDscdNo = model.getValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/dscdno"); if(instance1.selectSingleNode("/root/main/dschanalyhist/chngdeptlist["+iRow+"]").xml == instance1.selectSingleNode("/root/temp/dschanalyhist/chngdeptlist[dscdno='"+sDscdNo+"']").xml){ grd_chngdeptlist.rowStatus(iRow) = 0; } } } } } // 20081218 ¼öÁ¤ //grd_chngdeptlist.refresh(); // ÁßȯÀÚ½Ç for(var iRow = grd_iculist.fixedrows; iRow <= grd_iculist.rows-grd_iculist.fixedrows; iRow++){ var orddeptcd = model.getValue("/root/main/dschanalyhist/iculist["+iRow+"]/orddeptcd"); var indeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/indeptcd"); var iStatus = grd_iculist.rowStatus(iRow); if(indeptcd==orddeptcd){ if((orddeptcd=="2010000000")||(orddeptcd=="2040000000")||(orddeptcd=="2100000000")||(orddeptcd=="2110000000")){ model.makeValue("/root/main/dschanalyhist/iculist["+iRow+"]/ordclrsdeptcd",model.getValue("/root/main/dschanalyhist/dschanalyinfo/inclrsdeptcd")); if(iStatus == 0){ grd_iculist.rowStatus(iRow) = 2; }else if(iStatus == 2){ var sDsicuNo = model.getValue("/root/main/dschanalyhist/iculist["+iRow+"]/dsicuno"); if(instance1.selectSingleNode("/root/main/dschanalyhist/iculist["+iRow+"]").xml == instance1.selectSingleNode("/root/temp/dschanalyhist/iculist[dsicuno='"+sDsicuNo+"']").xml){ grd_iculist.rowStatus(iRow) = 0; } } } } } // 20081218 ¼öÁ¤ //grd_iculist.refresh(); } //2013/01/08 Start fnbabychk(); //2013/01/08 End } /** * @ver : 2008-12-09 * @desc : °¢ ±×¸®µåÁ¤º¸ÀÇ ÀÇ»ç Á¤º¸ Á¶È¸ * @by : ÀÌâ·Ï * @param : * @return : * @--------------------------------------------------- */ function fGridGetDeptUserInfo(pGrid) { if(pGrid =="grd_oplist"){//¼ö¼úÁ¤º¸ var iRow = grd_oplist.row - grd_oplist.fixedRows + 1; var opdd = model.getValue("/root/main/dschanalyhist/oplist["+iRow+"]/opdd"); var iStatus = grd_oplist.rowStatus(iRow); var opdeptengabbr = model.getValue("/root/main/dschanalyhist/oplist["+iRow+"]/opdeptengabbr"); var perfdrnm = model.getValue("/root/main/dschanalyhist/oplist["+iRow+"]/perfdrnm"); var perfdeptcd = model.getValue("/root/main/dschanalyhist/oplist["+iRow+"]/perfdeptcd"); var opdepthngnm = model.getValue("/root/main/dschanalyhist/oplist["+iRow+"]/opdepthngnm"); var perfdrid = model.getValue("/root/main/dschanalyhist/oplist["+iRow+"]/perfdrid"); var sDsopNo = model.getValue("/root/main/dschanalyhist/oplist["+iRow+"]/dsopno"); if(event.keyCode == 13){ if(opdd==""){ messageBox("¼ö¼úÀÏÀÚ¸¦ ¸ÕÀú","C001"); return; } if(grd_oplist.col==3){ if(opdeptengabbr==""){ return; } model.makeValue("root/send/stnddd" ,opdd); model.makeValue("root/send/deptengabbr" ,opdeptengabbr); if(submit("TRMRD00405", false)){ if(getNodesetCnt(model,"/root/temp/stndeptlist/stndept")>0){ model.setValue("/root/main/dschanalyhist/oplist["+iRow+"]/opdepthngnm" ,model.getValue("/root/temp/stndeptlist/stndept/depthngnm")); model.setValue("/root/main/dschanalyhist/oplist["+iRow+"]/perfdeptcd" ,model.getValue("/root/temp/stndeptlist/stndept/deptcd")); model.setValue("/root/main/dschanalyhist/oplist["+iRow+"]/opdeptengabbr ",model.getValue("/root/temp/stndeptlist/stndept/deptengabbr")); }else{ messageBox("ÀÔ·ÂÇÏ½Å ÇØ´ç°ú°¡","I004"); return; } } model.removeNodeset("/root/send"); }else if(grd_oplist.col==7){ if(perfdeptcd==""){ messageBox("ÇØ´ç¼ö¼ú°ú¸¦ ¸ÕÀú","C001"); model.setValue("/root/main/dschanalyhist/oplist["+iRow+"]/perfdrnm",""); return; } if(perfdrnm==""){ return; } model.makeValue("root/send/stndd" ,opdd); model.makeValue("root/send/usernm" ,perfdrnm); model.makeValue("root/send/stndeptcd" ,perfdeptcd); if(submit("TRMRD00406", false)){ if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")==1){ model.setValue("/root/main/dschanalyhist/oplist["+iRow+"]/perfdrnm" ,model.getValue("/root/temp/stnuserinfo/stnuserlist/usernm")); model.setValue("/root/main/dschanalyhist/oplist["+iRow+"]/perfdrid" ,model.getValue("/root/temp/stnuserinfo/stnuserlist/userid")); }else if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")>1){ var sRtnMsg = fPopUpUserInfo("grd_oplist", 7, 19); if(sRtnMsg == false && iStatus == 2){ model.setValue("/root/main/dschanalyhist/oplist["+iRow+"]/perfdrnm", model.getValue("/root/temp/dschanalyhist/oplist[dsopno ='"+sDsopNo+"']/perfdrnm")); model.setValue("/root/main/dschanalyhist/oplist["+iRow+"]/perfdrid", model.getValue("/root/temp/dschanalyhist/oplist[dsopno ='"+sDsopNo+"']/perfdrid")); } }else{ messageBox(opdepthngnm+"¿¡´Â ÀÔ·ÂÇϽŠÀÇ»çÁ¤º¸°¡","I004"); model.setValue("/root/main/dschanalyhist/oplist["+iRow+"]/perfdrnm",""); model.setValue("/root/main/dschanalyhist/oplist["+iRow+"]/perfdrid",""); return; } if(iStatus == 2){ if(instance1.selectSingleNode("/root/main/dschanalyhist/oplist["+iRow+"]").xml == instance1.selectSingleNode("/root/temp/dschanalyhist/oplist[dsopno ='"+sDsopNo+"']").xml ){ grd_oplist.rowStatus(iRow) = 0; } }else if(iStatus == 0){ if(instance1.selectSingleNode("/root/main/dschanalyhist/oplist["+iRow+"]").xml != instance1.selectSingleNode("/root/temp/dschanalyhist/oplist[dsopno ='"+sDsopNo+"']").xml ){ grd_oplist.rowStatus(iRow) = 2; } } } model.removeNodeset("/root/send"); } } // 20081218 ¼öÁ¤ //grd_oplist.refresh(); }else if(pGrid =="grd_cnstlist"){//ÇùÀÇÁ¤º¸ var iRow = grd_cnstlist.row - grd_cnstlist.fixedRows + 1; var reqdd = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqdd"); var reqdrnm = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqdrnm"); var reqdeptengabbr = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqdeptengabbr"); var reqdepthngnm = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqdepthngnm"); var reqdeptcd = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqdeptcd"); var execdd = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execdd"); var execdrnm = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execdrnm"); var execdeptengabbr = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execdeptengabbr"); var execdepthngnm = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execdepthngnm"); var execdeptcd = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execdeptcd"); var iStatus = grd_cnstlist.rowStatus(iRow); var sDscnstNo = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/dscnstno"); if(event.keyCode == 13){ if(grd_cnstlist.col==1){ if(reqdeptengabbr==""){ return; } if(reqdd==""){ messageBox("ÀÇ·ÚÀÏÀ» ¸ÕÀú","C001"); return; } model.makeValue("root/send/stnddd" ,reqdd); model.makeValue("root/send/deptengabbr" ,reqdeptengabbr); if(submit("TRMRD00405", false)){ if(getNodesetCnt(model,"/root/temp/stndeptlist/stndept")>0){ model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqdepthngnm" ,model.getValue("/root/temp/stndeptlist/stndept/depthngnm")); model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqdeptcd" ,model.getValue("/root/temp/stndeptlist/stndept/deptcd")); model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqdeptengabbr" ,model.getValue("/root/temp/stndeptlist/stndept/deptengabbr")); }else{ messageBox("ÀÔ·ÂÇÏ½Å ÇØ´ç°ú°¡","I004"); return; } } model.removeNodeset("/root/send"); }else if(grd_cnstlist.col==7){ if(execdeptengabbr==""){ return; } if(execdd==""){ messageBox("ȸ½ÅÀÏÀ» ¸ÕÀú","C001"); return; } model.makeValue("root/send/stnddd",execdd); model.makeValue("root/send/deptengabbr",execdeptengabbr); if(submit("TRMRD00405", false)){ if(getNodesetCnt(model,"/root/temp/stndeptlist/stndept")>0){ model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execdepthngnm" ,model.getValue("/root/temp/stndeptlist/stndept/depthngnm")); model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execdeptcd" ,model.getValue("/root/temp/stndeptlist/stndept/deptcd")); model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execdeptengabbr",model.getValue("/root/temp/stndeptlist/stndept/deptengabbr")); }else{ messageBox("ÀÔ·ÂÇÏ½Å ÇØ´ç°ú°¡","I004"); return; } } model.removeNodeset("/root/send"); }else if(grd_cnstlist.col==5){ if(reqdeptcd==""){ messageBox("ÇØ´çÀÇ·Ú°ú¸¦ ¸ÕÀú","C001"); model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqdrnm",""); return; } if(reqdrnm==""){ return; } model.makeValue("root/send/stndd" ,reqdd); model.makeValue("root/send/usernm" ,reqdrnm); model.makeValue("root/send/stndeptcd" ,reqdeptcd); if(submit("TRMRD00406", false)){ if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")==1){ model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqdrnm" ,model.getValue("/root/temp/stnuserinfo/stnuserlist/usernm")); model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqdrid" ,model.getValue("/root/temp/stnuserinfo/stnuserlist/userid")); }else if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")>1){ var sRtnMsg = fPopUpUserInfo("grd_cnstlist", 5, 18); if(sRtnMsg == false && iStatus == 2){ model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqdrnm", model.getValue("/root/temp/dschanalyhist/cnstlist[dscnstno ='"+sDscnstNo+"']/reqdrnm")); model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqdrid", model.getValue("/root/temp/dschanalyhist/cnstlist[dscnstno ='"+sDscnstNo+"']/reqdrid")); } }else{ messageBox(reqdepthngnm+"¿¡´Â ÀÔ·ÂÇϽŠÀÇ»çÁ¤º¸°¡","I004"); model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqdrnm",""); model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqdrid",""); return; } if(iStatus == 2){ if(instance1.selectSingleNode("/root/main/dschanalyhist/cnstlist["+iRow+"]").xml == instance1.selectSingleNode("/root/temp/dschanalyhist/cnstlist[dscnstno ='"+sDscnstNo+"']").xml ){ grd_cnstlist.rowStatus(iRow) = 0; } }else if(iStatus == 0){ if(instance1.selectSingleNode("/root/main/dschanalyhist/cnstlist["+iRow+"]").xml != instance1.selectSingleNode("/root/temp/dschanalyhist/cnstlist[dscnstno ='"+sDscnstNo+"']").xml ){ grd_cnstlist.rowStatus(iRow) = 2; } } } model.removeNodeset("/root/send"); }else if(grd_cnstlist.col==11){ if(execdeptcd==""){ messageBox("ÇØ´çȸ½Å°ú¸¦ ¸ÕÀú","C001"); model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execdrnm",""); return; } if(execdrnm==""){ return; } model.makeValue("root/send/stndd" ,execdd); model.makeValue("root/send/usernm" ,execdrnm); model.makeValue("root/send/stndeptcd" ,execdeptcd); if(submit("TRMRD00406", false)){ if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")==1){ model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execdrnm" ,model.getValue("/root/temp/stnuserinfo/stnuserlist/usernm")); model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execdrid" ,model.getValue("/root/temp/stnuserinfo/stnuserlist/userid")); }else if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")>1){ var sRtnMsg = fPopUpUserInfo("grd_cnstlist", 11, 19); if(sRtnMsg == false && iStatus == 2){ model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execdrnm", model.getValue("/root/temp/dschanalyhist/cnstlist[dscnstno ='"+sDscnstNo+"']/execdrnm")); model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execdrid", model.getValue("/root/temp/dschanalyhist/cnstlist[dscnstno ='"+sDscnstNo+"']/execdrid")); } }else{ messageBox(execdepthngnm+"¿¡´Â ÀÔ·ÂÇϽŠÀÇ»çÁ¤º¸°¡","I004"); model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execdrnm",""); model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execdrid",""); return; } if(iStatus == 2){ if(instance1.selectSingleNode("/root/main/dschanalyhist/cnstlist["+iRow+"]").xml == instance1.selectSingleNode("/root/temp/dschanalyhist/cnstlist[dscnstno ='"+sDscnstNo+"']").xml ){ grd_cnstlist.rowStatus(iRow) = 0; } }else if(iStatus == 0){ if(instance1.selectSingleNode("/root/main/dschanalyhist/cnstlist["+iRow+"]").xml != instance1.selectSingleNode("/root/temp/dschanalyhist/cnstlist[dscnstno ='"+sDscnstNo+"']").xml ){ grd_cnstlist.rowStatus(iRow) = 2; } } } model.removeNodeset("/root/send"); } } // 20081218 ¼öÁ¤ //grd_cnstlist.refresh(); }else if(pGrid =="grd_chngdeptlist"){//Àü°úÁ¤º¸ if(event.keyCode == 13){ var iRow = grd_chngdeptlist.row - grd_chngdeptlist.fixedRows + 1; var chngdeptdd = model.getValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngdeptdd"); var chngdeptengabbr = model.getValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngdeptengabbr"); var chngdeptdrnm = model.getValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngdeptdrnm"); var chngdeptcd = model.getValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngdeptcd"); var chngdepthngnm = model.getValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngdepthngnm"); var iStatus = grd_chngdeptlist.rowStatus(iRow); var sDscdNo = model.getValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/dscdno"); if(grd_chngdeptlist.col==2){ if(chngdeptengabbr==""){ return; } if(chngdeptdd==""){ messageBox("ÀüÃâÀÏÀÚ¸¦ ¸ÕÀú","C001"); return; } model.makeValue("root/send/stnddd" ,chngdeptdd); model.makeValue("root/send/deptengabbr" ,chngdeptengabbr); if(submit("TRMRD00405", false)){ if(getNodesetCnt(model,"/root/temp/stndeptlist/stndept")>0){ model.setValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngdepthngnm",model.getValue("/root/temp/stndeptlist/stndept/depthngnm")); model.setValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngdeptcd",model.getValue("/root/temp/stndeptlist/stndept/deptcd")); model.setValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngdeptengabbr",model.getValue("/root/temp/stndeptlist/stndept/deptengabbr")); }else{ messageBox("ÀÔ·ÂÇÏ½Å ÇØ´ç°ú°¡","I004"); return; } } model.removeNodeset("/root/send"); }else if(grd_chngdeptlist.col==6){ if(chngdeptcd==""){ messageBox("ÇØ´çÀüÃâ°ú¸¦ ¸ÕÀú","C001"); model.setValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngdeptdrnm",""); return; } if(chngdeptdrnm==""){ return; } model.makeValue("root/send/stndd" ,chngdeptdd); model.makeValue("root/send/usernm" ,chngdeptdrnm); model.makeValue("root/send/stndeptcd" ,chngdeptcd); if(submit("TRMRD00406", false)){ if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")==1){ model.setValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngdeptdrnm" ,model.getValue("/root/temp/stnuserinfo/stnuserlist/usernm")); model.setValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngdeptdrid" ,model.getValue("/root/temp/stnuserinfo/stnuserlist/userid")); }else if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")>1){ var sRtnMsg = fPopUpUserInfo("grd_chngdeptlist", 6, 14); if(sRtnMsg == false && iStatus == 2){ model.setValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngdeptdrnm", model.getValue("/root/temp/dschanalyhist/chngdeptlist[dscdno ='"+sDscdNo+"']/chngdeptdrnm")); model.setValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngdeptdrid", model.getValue("/root/temp/dschanalyhist/chngdeptlist[dscdno ='"+sDscdNo+"']/chngdeptdrid")); } }else{ messageBox(chngdepthngnm+"¿¡´Â ÀÔ·ÂÇϽŠÀÇ»çÁ¤º¸°¡","I004"); model.setValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngdeptdrnm",""); model.setValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngdeptdrid",""); return; } if(iStatus == 2){ if(instance1.selectSingleNode("/root/main/dschanalyhist/chngdeptlist["+iRow+"]").xml == instance1.selectSingleNode("/root/temp/dschanalyhist/chngdeptlist[dscdno ='"+sDscdNo+"']").xml ){ grd_chngdeptlist.rowStatus(iRow) = 0; } }else if(iStatus == 0){ if(instance1.selectSingleNode("/root/main/dschanalyhist/chngdeptlist["+iRow+"]").xml != instance1.selectSingleNode("/root/temp/dschanalyhist/chngdeptlist[dscdno ='"+sDscdNo+"']").xml ){ grd_chngdeptlist.rowStatus(iRow) = 2; } } } model.removeNodeset("/root/send"); } // 20081218 ¼öÁ¤ //grd_chngdeptlist.refresh(); } }else if(pGrid =="grd_iculist"){//ÁßȯÀÚ½ÇÁ¤º¸ var iRow = grd_iculist.row - grd_iculist.fixedRows + 1; var inrmdd = model.getValue("/root/main/dschanalyhist/iculist["+iRow+"]/inrmdd"); var orddeptengabbr = model.getValue("/root/main/dschanalyhist/iculist["+iRow+"]/orddeptengabbr"); if(event.keyCode == 13){ if(grd_iculist.col==2){ if(grd_iculist.valueMatrix(iRow,2)==""){ return; } if(inrmdd==""){ messageBox("ÀÔ½ÇÀÏÀÚ¸¦ ¸ÕÀú","C001"); return; } model.makeValue("root/send/stnddd",inrmdd); model.makeValue("root/send/deptengabbr",grd_iculist.valueMatrix(iRow,2)); if(submit("TRMRD00405", false)){ if(getNodesetCnt(model,"/root/temp/stndeptlist/stndept")>0){ var depthngnm = model.getValue("/root/temp/stndeptlist/stndept/depthngnm") var deptcd = model.getValue("/root/temp/stndeptlist/stndept/deptcd") var deptengabbr =model.getValue("/root/temp/stndeptlist/stndept/deptengabbr") grd_iculist.valueMatrix(iRow,2)=deptengabbr; grd_iculist.valueMatrix(iRow,3)=depthngnm; grd_iculist.valueMatrix(iRow,4)=deptcd; }else{ messageBox("ÀÔ·ÂÇÏ½Å ÇØ´ç°ú°¡","I004"); return; } } model.removeNodeset("/root/send"); } } // 20081218 ¼öÁ¤ //grd_iculist.refresh(); } } /** * @ver : 2008-12-09 * @desc : °¢ inputÁ¤º¸ÀÇ ÀÇ»ç Á¤º¸ Á¶È¸ * @by : ÀÌâ·Ï * @param : * @return : * @--------------------------------------------------- */ function fIptGetDeptUserInfo(flag) { var inrmdd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/inrmdd"); var indeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/indeptcd"); var dschdeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschdeptcd"); var dschdd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschdd"); if(flag =="ipt_indrid"){ if(event.keyCode == 13){ model.makeValue("root/send/stndd" ,inrmdd); model.makeValue("root/send/userid" ,ipt_indrid.currentText); model.makeValue("root/send/stndeptcd" ,indeptcd); if(submit("TRMRD00406", false)){ if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")==1){ model.setValue(xDschAnalyListPath+"/indrid", model.getValue("/root/temp/stnuserinfo/stnuserlist/userid")); model.setValue(xDschAnalyListPath+"/indrnm", model.getValue("/root/temp/stnuserinfo/stnuserlist/usernm")); // 20081218 ¼öÁ¤ //ipt_indrid.refresh(); //ipt_indrnm.refresh(); model.refresh(); }else if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")>1){ clearParameter("reqflag"); clearParameter("usernm"); clearParameter("stnddd"); clearParameter("autortnyn"); setParameter("reqflag", "userid"); setParameter("userid", ipt_indrid.currentText); setParameter("stnddd", inrmdd); setParameter("autortnyn","Y"); model.resetInstanceNode("/root/temp/userinfo"); modal("SPMRF03200"); var userid = model.getValue("/root/temp/userinfo/userid") if(userid!=""){ model.setValue(xDschAnalyListPath+"/indrid", model.getValue("/root/temp/userinfo/userid")); model.setValue(xDschAnalyListPath+"/indrnm", model.getValue("/root/temp/userinfo/usernm")); // 20081218 ¼öÁ¤ //ipt_indrid.refresh(); //ipt_indrnm.refresh(); model.refresh(); }else{ return; } }else{ messageBox(cmb_indeptcd.label+"¿¡´Â ÀÔ·ÂÇϽŠÀÇ»çÁ¤º¸°¡","I004"); // 20081218 ¼öÁ¤ //ipt_indrid.refresh(); //ipt_indrnm.refresh(); model.refresh(); return; } } } }else if(flag =="ipt_indrnm"){ if(event.keyCode == 13){ model.makeValue("root/send/stndd" ,inrmdd); model.makeValue("root/send/usernm" ,ipt_indrnm.currentText); model.makeValue("root/send/stndeptcd" ,indeptcd); if(submit("TRMRD00406", false)){ if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")==1){ model.setValue(xDschAnalyListPath+"/indrid", model.getValue("/root/temp/stnuserinfo/stnuserlist/userid")); model.setValue(xDschAnalyListPath+"/indrnm", model.getValue("/root/temp/stnuserinfo/stnuserlist/usernm")); // 20081218 ¼öÁ¤ //ipt_indrid.refresh(); //ipt_indrnm.refresh(); model.refresh(); }else if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")>1){ clearParameter("reqflag"); clearParameter("usernm"); clearParameter("stnddd"); clearParameter("autortnyn"); setParameter("reqflag", "usernm"); setParameter("userid", ipt_indrnm.currentText); setParameter("stnddd", inrmdd); setParameter("autortnyn","Y"); model.resetInstanceNode("/root/temp/userinfo"); modal("SPMRF03200"); var userid = model.getValue("/root/temp/userinfo/userid") if(userid!=""){ model.setValue(xDschAnalyListPath+"/indrid", model.getValue("/root/temp/userinfo/userid")); model.setValue(xDschAnalyListPath+"/indrnm", model.getValue("/root/temp/userinfo/usernm")); // 20081218 ¼öÁ¤ //ipt_indrid.refresh(); //ipt_indrnm.refresh(); model.refresh(); }else{ return; } }else{ messageBox(cmb_indeptcd.label+"¿¡´Â ÀÔ·ÂÇϽŠÀÇ»çÁ¤º¸°¡","I004"); // 20081218 ¼öÁ¤ //ipt_indrid.refresh(); //ipt_indrnm.refresh(); model.refresh(); return; } } } }else if(flag =="ipt_inapprtcdrid"){ if(event.keyCode == 13){ model.makeValue("root/send/stndd" ,inrmdd); model.makeValue("root/send/userid" ,ipt_inapprtcdrid.currentText); model.makeValue("root/send/stndeptcd" ,indeptcd); if(submit("TRMRD00406", false)){ if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")==1){ model.setValue(xDschAnalyListPath+"/inapprtcdrid", model.getValue("/root/temp/stnuserinfo/stnuserlist/userid")); model.setValue(xDschAnalyListPath+"/inapprtcdrnm", model.getValue("/root/temp/stnuserinfo/stnuserlist/usernm")); // 20081218 ¼öÁ¤ //ipt_inapprtcdrid.refresh(); //ipt_inapprtcdrnm.refresh(); model.refresh(); }else if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")>1){ clearParameter("reqflag"); clearParameter("usernm"); clearParameter("stnddd"); clearParameter("autortnyn"); setParameter("reqflag", "userid"); setParameter("userid", ipt_inapprtcdrid.currentText); setParameter("stnddd", inrmdd); setParameter("autortnyn","Y"); model.resetInstanceNode("/root/temp/userinfo"); modal("SPMRF03200"); var userid = model.getValue("/root/temp/userinfo/userid") if(userid!=""){ model.setValue(xDschAnalyListPath+"/inapprtcdrid", model.getValue("/root/temp/userinfo/userid")); model.setValue(xDschAnalyListPath+"/inapprtcdrnm", model.getValue("/root/temp/userinfo/usernm")); // 20081218 ¼öÁ¤ //ipt_inapprtcdrid.refresh(); //ipt_inapprtcdrnm.refresh(); model.refresh(); }else{ return; } }else{ messageBox(cmb_indeptcd.label+"¿¡´Â ÀÔ·ÂÇϽŠÀÇ»çÁ¤º¸°¡","I004"); // 20081218 ¼öÁ¤ //ipt_inapprtcdrid.refresh(); //ipt_inapprtcdrnm.refresh(); model.refresh(); return; } } } }else if(flag =="ipt_inapprtcdrnm"){ if(event.keyCode == 13){ model.makeValue("root/send/stndd" ,inrmdd); model.makeValue("root/send/usernm" ,ipt_inapprtcdrnm.currentText); model.makeValue("root/send/stndeptcd" ,indeptcd); if(submit("TRMRD00406", false)){ if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")==1){ model.setValue(xDschAnalyListPath+"/inapprtcdrid", model.getValue("/root/temp/stnuserinfo/stnuserlist/userid")); model.setValue(xDschAnalyListPath+"/inapprtcdrnm", model.getValue("/root/temp/stnuserinfo/stnuserlist/usernm")); // 20081218 ¼öÁ¤ //ipt_inapprtcdrid.refresh(); //ipt_inapprtcdrnm.refresh(); model.refresh(); }else if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")>1){ clearParameter("reqflag"); clearParameter("usernm"); clearParameter("stnddd"); clearParameter("autortnyn"); setParameter("reqflag", "usernm"); setParameter("userid", ipt_inapprtcdrnm.currentText); setParameter("stnddd", inrmdd); setParameter("autortnyn","Y"); model.resetInstanceNode("/root/temp/userinfo"); modal("SPMRF03200"); var userid = model.getValue("/root/temp/userinfo/userid") if(userid!=""){ model.setValue(xDschAnalyListPath+"/inapprtcdrid", model.getValue("/root/temp/userinfo/userid")); model.setValue(xDschAnalyListPath+"/inapprtcdrnm", model.getValue("/root/temp/userinfo/usernm")); // 20081218 ¼öÁ¤ //ipt_inapprtcdrid.refresh(); //ipt_inapprtcdrnm.refresh(); model.refresh(); }else{ return; } }else{ messageBox(cmb_indeptcd.label+"¿¡´Â ÀÔ·ÂÇϽŠÀÇ»çÁ¤º¸°¡","I004"); // 20081218 ¼öÁ¤ //ipt_inapprtcdrid.refresh(); //ipt_inapprtcdrnm.refresh(); model.refresh(); return; } } } }else if(flag =="ipt_dschdrid"){ if(event.keyCode == 13){ model.makeValue("root/send/stndd" ,dschdd); model.makeValue("root/send/userid" ,ipt_dschdrid.currentText); model.makeValue("root/send/stndeptcd" ,dschdeptcd); if(submit("TRMRD00406", false)){ if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")==1){ model.setValue(xDschAnalyListPath+"/dschdrid", model.getValue("/root/temp/stnuserinfo/stnuserlist/userid")); model.setValue(xDschAnalyListPath+"/dschdrnm", model.getValue("/root/temp/stnuserinfo/stnuserlist/usernm")); // 20081218 ¼öÁ¤ //ipt_dschdrid.refresh(); //ipt_dschdrnm.refresh(); model.refresh(); }else if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")>1){ clearParameter("reqflag"); clearParameter("usernm"); clearParameter("stnddd"); clearParameter("autortnyn"); setParameter("reqflag", "userid"); setParameter("userid", ipt_dschdrid.currentText); setParameter("stnddd", dschdd); setParameter("autortnyn","Y"); model.resetInstanceNode("/root/temp/userinfo"); modal("SPMRF03200"); var userid = model.getValue("/root/temp/userinfo/userid") if(userid!=""){ model.setValue(xDschAnalyListPath+"/dschdrid", model.getValue("/root/temp/userinfo/userid")); model.setValue(xDschAnalyListPath+"/dschdrnm", model.getValue("/root/temp/userinfo/usernm")); // 20081218 ¼öÁ¤ //ipt_dschdrid.refresh(); //ipt_dschdrnm.refresh(); model.refresh(); }else{ return; } }else{ messageBox(cmb_dschdeptcd.label+"¿¡´Â ÀÔ·ÂÇϽŠÀÇ»çÁ¤º¸°¡","I004"); // 20081218 ¼öÁ¤ //ipt_dschdrid.refresh(); //ipt_dschdrnm.refresh(); model.refresh(); return; } } } }else if(flag =="ipt_dschdrnm"){ if(event.keyCode == 13){ model.makeValue("root/send/stndd" ,dschdd); model.makeValue("root/send/usernm" ,ipt_dschdrnm.currentText); model.makeValue("root/send/stndeptcd" ,dschdeptcd); if(submit("TRMRD00406", false)){ if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")==1){ model.setValue(xDschAnalyListPath+"/dschdrid", model.getValue("/root/temp/stnuserinfo/stnuserlist/userid")); model.setValue(xDschAnalyListPath+"/dschdrnm", model.getValue("/root/temp/stnuserinfo/stnuserlist/usernm")); // 20081218 ¼öÁ¤ //ipt_dschdrid.refresh(); //ipt_dschdrnm.refresh(); model.refresh(); }else if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")>1){ clearParameter("reqflag"); clearParameter("usernm"); clearParameter("stnddd"); clearParameter("autortnyn"); setParameter("reqflag", "usernm"); setParameter("userid", ipt_dschdrnm.currentText); setParameter("stnddd", dschdd); setParameter("autortnyn","Y"); model.resetInstanceNode("/root/temp/userinfo"); modal("SPMRF03200"); var userid = model.getValue("/root/temp/userinfo/userid") if(userid!=""){ model.setValue(xDschAnalyListPath+"/dschdrid", model.getValue("/root/temp/userinfo/userid")); model.setValue(xDschAnalyListPath+"/dschdrnm", model.getValue("/root/temp/userinfo/usernm")); // 20081218 ¼öÁ¤ //ipt_dschdrid.refresh(); //ipt_dschdrnm.refresh(); model.refresh(); }else{ return; } }else{ messageBox(cmb_dschdeptcd.label+"¿¡´Â ÀÔ·ÂÇϽŠÀÇ»çÁ¤º¸°¡","I004"); // 20081218 ¼öÁ¤ //ipt_dschdrid.refresh(); //ipt_dschdrnm.refresh(); model.refresh(); return; } } } }else if(flag =="ipt_dschapprtcdrid"){ if(event.keyCode == 13){ model.makeValue("root/send/stndd" ,dschdd); model.makeValue("root/send/userid" ,ipt_dschapprtcdrid.currentText); model.makeValue("root/send/stndeptcd" ,dschdeptcd); if(submit("TRMRD00406", false)){ if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")==1){ model.setValue(xDschAnalyListPath+"/dschapprtcdrid", model.getValue("/root/temp/stnuserinfo/stnuserlist/userid")); model.setValue(xDschAnalyListPath+"/dschapprtcdrnm", model.getValue("/root/temp/stnuserinfo/stnuserlist/usernm")); // 20081218 ¼öÁ¤ //ipt_dschapprtcdrid.refresh(); //ipt_dschapprtcdrnm.refresh(); model.refresh(); }else if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")>1){ clearParameter("reqflag"); clearParameter("usernm"); clearParameter("stnddd"); clearParameter("autortnyn"); setParameter("reqflag", "userid"); setParameter("userid", ipt_dschapprtcdrid.currentText); setParameter("stnddd", dschdd); setParameter("autortnyn","Y"); model.resetInstanceNode("/root/temp/userinfo"); modal("SPMRF03200"); var userid = model.getValue("/root/temp/userinfo/userid") if(userid!=""){ model.setValue(xDschAnalyListPath+"/dschapprtcdrid", model.getValue("/root/temp/userinfo/userid")); model.setValue(xDschAnalyListPath+"/dschapprtcdrnm", model.getValue("/root/temp/userinfo/usernm")); // 20081218 ¼öÁ¤ //ipt_dschapprtcdrid.refresh(); //ipt_dschapprtcdrnm.refresh(); model.refresh(); }else{ return; } }else{ messageBox(cmb_dschdeptcd.label+"¿¡´Â ÀÔ·ÂÇϽŠÀÇ»çÁ¤º¸°¡","I004"); // 20081218 ¼öÁ¤ //ipt_dschapprtcdrid.refresh(); //ipt_dschapprtcdrnm.refresh(); model.refresh(); return; } } } }else if(flag =="ipt_dschapprtcdrnm"){ if(event.keyCode == 13){ model.makeValue("root/send/stndd" ,dschdd); model.makeValue("root/send/usernm" ,ipt_dschapprtcdrnm.currentText); model.makeValue("root/send/stndeptcd" ,dschdeptcd); if(submit("TRMRD00406",false)){ if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")==1){ model.setValue(xDschAnalyListPath+"/dschapprtcdrid", model.getValue("/root/temp/stnuserinfo/stnuserlist/userid")); model.setValue(xDschAnalyListPath+"/dschapprtcdrnm", model.getValue("/root/temp/stnuserinfo/stnuserlist/usernm")); // 20081218 ¼öÁ¤ //ipt_dschapprtcdrid.refresh(); //ipt_dschapprtcdrnm.refresh(); model.refresh(); }else if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")>1){ clearParameter("reqflag"); clearParameter("usernm"); clearParameter("stnddd"); clearParameter("autortnyn"); setParameter("reqflag", "usernm"); setParameter("usernm", ipt_dschapprtcdrnm.currentText); setParameter("stnddd", dschdd); setParameter("autortnyn","Y"); model.resetInstanceNode("/root/temp/userinfo"); modal("SPMRF03200"); var userid = model.getValue("/root/temp/userinfo/userid") if(userid!=""){ model.setValue(xDschAnalyListPath+"/dschapprtcdrid", model.getValue("/root/temp/userinfo/userid")); model.setValue(xDschAnalyListPath+"/dschapprtcdrnm", model.getValue("/root/temp/userinfo/usernm")); // 20081218 ¼öÁ¤ //ipt_dschapprtcdrid.refresh(); //ipt_dschapprtcdrnm.refresh(); model.refresh(); }else{ return; } }else{ messageBox(cmb_dschdeptcd.label+"¿¡´Â ÀÔ·ÂÇϽŠÀÇ»çÁ¤º¸°¡","I004"); // 20081218 ¼öÁ¤ //ipt_dschapprtcdrid.refresh(); //ipt_dschapprtcdrnm.refresh(); model.refresh(); return; } } } } model.removeNodeset("/root/send"); } function fSetUnPrepDetlDeptInfo() { try { var saveyn = model.getValue("/root/main/detldeptcdsaveyn"); var adapt = model.getValue("/root/hidden/adaptdetldeptcd/hardcd/hardcd"); // ÇϵåÄÚµå Å×ÀÌºí ¹ÌºñºÐ°ú Àû¿ë º´¿ø¿¡¸¸ µ¿ÀÛÇϵµ·Ï ÇÔ. if(adapt == "Y") { if(saveyn != "N") { ///////////////////////////////////////////////////////////////////////// // ¹Ìºñ±â·Ï°ü¸® ¹ÌºñºÐ°ú ¼³Á¤ // 2009.09.21 À̰æÈñ model.removeNodeset("/root/main/dschanalyhist/detldeptcdinfo"); model.makeNode("/root/main/dschanalyhist/detldeptcdinfo"); var detldeptcd = ""; var indxCnt = 0; var detldeptcdinfoCnt = 0; var upmrindd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/inrmdd"); var upmrdschdd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschdd"); var upmrpid = model.getValue("/root/main/dschanalyhist/dschanalyinfo/pid"); var upmrindd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/indd"); var upmrcretno = model.getValue("/root/main/dschanalyhist/dschanalyinfo/cretno"); //////////////////////////////////////////////////////////////////////////// // 1) Àç¿ø±â°£Áß ¼ö¼ú ½ÃÇàÇÑ °æ¿ì ¼ö¼úÁ¤º¸ ³» ¼ö¼úºÐ°ú ¿¬µ¿ indxCnt = getNodesetCnt(model, "/root/main/dschanalyhist/oplist"); if(indxCnt > 0) { var upmropdd = ""; // ¼ö¼úÀÏÀÚ var upmrperfdrid = "";// ÁýµµÀÇ var upmrperfdeptcd = "";// ¼ö¼ú°ú var upmropclrsdeptcd = ""; // ¼ö¼úºÐ°ú var OpDeptList = findNodeset(model, "/root/main/dschanalyhist/oplist"); var OpDeptNode = ""; for(var idx = 0; idx < OpDeptList.length; idx++) { OpDeptNode = OpDeptList.item(idx); upmropdd = OpDeptNode.selectSingleNode("opdd").text; upmrperfdeptcd = OpDeptNode.selectSingleNode("perfdeptcd").text; upmrperfdrid = OpDeptNode.selectSingleNode("perfdrid").text; upmropclrsdeptcd = OpDeptNode.selectSingleNode("opclrsdeptcd").text; if(upmropclrsdeptcd == "") // ¹ÌºñºÐ°ú°¡ ¼³Á¤µÇ¾î ÀÖÁö ¾ÊÀº °æ¿ì ¹Ìºñ°ú·Î µ¿ÀÏÇÏ°Ô Àû¿ëÇÔ. upmropclrsdeptcd = upmrperfdeptcd; grd_detldeptlist.addItem(); detldeptcdinfoCnt = grd_detldeptlist.rows - grd_detldeptlist.fixedrows; model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/gubun", "OP"); // gubun: N(ÀϹÝ), OP(¼ö¼ú) model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrindd", upmrindd); // ÀÔ¿øÀÏÀÚ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrdschdd", upmrdschdd); // Åð¿øÀÏÀÚ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmropdd", upmropdd); // ¼ö¼úÀÏÀÚ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrchst", ""); // ÀüÃâ ½ÃÀÛÀÏÀÚ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrched", ""); model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrordeptcd", upmrperfdeptcd); // ¼ö¼ú°ú model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrdetldeptcd", upmropclrsdeptcd); // ¼ö¼úºÐ°ú model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrpid", upmrpid); // ȯÀÚ¹øÈ£ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrindd", upmrindd); // ÀÔ¿øÀÏÀÚ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrcretno", upmrcretno); // cretno model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/perfdrid", upmrperfdrid); // ÁýµµÀÇID //detldeptcdinfoCnt++; } } //////////////////////////////////////////////////////////////////////////// // 2) Àü°ú³»¿ª ¾øÀÌ ÀÔÅð¿ø°ú°¡ µ¿ÀÏÇÑ °æ¿ì Åð¿øºÐ°ú¸¦ ±âÁØÀ¸·Î ¿¬µ¿ÇÔ. // Àü°úÁ¤º¸ È®ÀÎ (grd_chngdeptlist) indxCnt = getNodesetCnt(model, "/root/main/dschanalyhist/chngdeptlist"); if(indxCnt == 0) // 2-1)Àü°ú³»¿ªÀÌ ¾ø´Â °æ¿ì { var upmrindeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/indeptcd"); // ÀÔ¿ø°ú var upmrinclrsdeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/inclrsdeptcd"); // ÀÔ¿øºÐ°ú var upmrdschdeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschdeptcd"); // Åð¿ø°ú var upmrdschclrsdeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschclrsdeptcd"); // Åð¿øºÐ°ú //////////////////////////////////////////////////////////////////////////// // Åð¿ø°ú°¡ ¹ÌºñºÐ°úÀÎÁö È®ÀÎ var InDeptList = getNodesetCnt(model, "/root/hidden/indeptchklist/hardcd[hardcd = '" + upmrdschdeptcd + "']"); if(InDeptList > 0) { upmrdschclrsdeptcd = upmrdschdeptcd; // ¹ÌºñºÐ°ú Äڵ带 Àû¿ë } //////////////////////////////////////////////////////////////////////////// // Åð¿ø°ú°¡ ¹ÌºñºÐ°ú Àû¿ë°ú°¡ ¾Æ´Ñ °æ¿ì if(upmrdschclrsdeptcd == "") // ¹ÌºñºÐ°ú°¡ ¾øÀ» °æ¿ì »óÀ§°ú¿Í µ¿ÀÏÇÏ°Ô Ã³¸®ÇÔ. upmrdschclrsdeptcd = upmrdschdeptcd; //////////////////////////////////////////////////////////////////////////// // 1-1) ÀÔ¿ø°ú, Åð¿ø°ú°¡ °°Àº °æ¿ì Åð¿ø°ú ¹ÌºñºÐ°ú¸¦ ±âÁØÀ¸·Î ¹Ý¿µ // if(upmrindeptcd == upmrdschdeptcd) { grd_detldeptlist.addItem(); detldeptcdinfoCnt = grd_detldeptlist.rows - grd_detldeptlist.fixedrows; model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/status", 1); // »óÅ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/gubun", "N"); // gubun: N(ÀϹÝ), OP(¼ö¼ú) model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrindd", upmrindd); // ÀÔ¿øÀÏÀÚ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrdschdd", upmrdschdd); // Åð¿øÀÏÀÚ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmropdd", ""); // ¼ö¼úÀÏÀÚ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrchst", ""); // ÀüÃâ ½ÃÀÛÀÏÀÚ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrched", ""); model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrordeptcd", upmrdschdeptcd); // Åð¿ø°ú model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrdetldeptcd", upmrdschclrsdeptcd); // Åð¿øºÐ°ú model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrpid", upmrpid); // ȯÀÚ¹øÈ£ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrindd", upmrindd); // ÀÔ¿øÀÏÀÚ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrcretno", upmrcretno); // cretno model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/perfdrid", ""); // ÁýµµÀÇID } } else // 2-2)Àü°ú ³»¿ªÀÌ ÀÖ´Â °æ¿ì { // 1ȸ Àü°úÇÑ °æ¿ì // - ÀÔ¿øÀϺÎÅÍ ÀüÃâÀϱîÁö ÀüÃâºÐ°ú¸¦ ºÐ°úÀû¿ë // - ÀüÃâÀÏ ´ÙÀ½³¯ºÎÅÍ Åð¿øÀϱîÁö Åð¿øºÐ°ú·Î Àû¿ë // 2ȸ ÀÌ»ó Àü°úÇÑ °æ¿ì // - ÀÔ¿øÀϺÎÅÍ 1ȸ ÀüÃâÀϱîÁö 1ȸ ÀüÃâºÐ°ú Àû¿ë // - 1ȸ ÀüÃâÀϺÎÅÍ 2ȸ ÀüÃâÀϱîÁö 2ȸ ÀüÃâºÐ°ú Àû¿ë // (¿©·¯¹ø Àü°úÇÑ °æ¿ìµµ µ¿ÀÏÇÑ ±âÁØÀ¸·Î Àû¿ë) // Àü°úÁ¤º¸ ³» ÀüÃâºÐ°ú°¡ ¾øÀ» °æ¿ì ºÐ°ú¿¡ ÇØ´çµÇÁö ¾Ê´Â »óÀ§°ú¿Í ¼¼ºÎ°ú°¡ µ¿ÀÏÇÏ´Ù´Â Àǹ̷Π¹ÌºñºÐ°ú Ä÷³¿¡ ¹Ìºñ°ú¿Í µ¿ÀÏÇÏ°Ô Ã³¸®ÇÔ. // Àü°úÁ¤º¸°¡ ÀÖÀ» °æ¿ì // Àü°úÁ¤º¸ÀÇ °ú¿Í ¹Ìºñ³»¿ªÀÇ ¹Ìºñ°ú¸¦ Á¶È¸ÇÏ¿© ºñ±³ÇÑ ÈÄ, // Àü°úÁ¤º¸ÀÇ °ú¿Í ¹Ìºñ³»¿ªÀÇ ¹Ìºñ°ú°¡ ´Ù¸¥ °æ¿ì ¹Ìºñ³»¿ªÀÇ ¹Ìºñ°ú¸¦ ±×´ë·Î µÎ°í, // Àü°úÁ¤º¸ÀÇ °ú¿Í ¹Ìºñ³»¿ªÀÇ ¹Ìºñ°ú°¡ °°Àº °æ¿ì Àü°úÁ¤º¸¸¦ µû¶ó°¨. var upmrchdd = ""; // ÀüÃâÀÏÀÚ var upmrchbefrdd = "" // ÀüÃâÀÏ Àü³¯Â¥ var upmrchnextdd = ""; // ÀüÃâÀÏ ´ÙÀ½³¯ÀÚ var upmrchdeptcd = "";// ÀüÃâ°ú var upmrchdetldeptcd = ""; // ÀüÃâºÐ°ú var chDeptList = findNodeset(model, "/root/main/dschanalyhist/chngdeptlist"); var chDeptNode = ""; // Àü°úÁ¤º¸ var chNextDeptNode = ""; // ´ÙÀ½ Àü°úÁ¤º¸ var bfupmrchdd = ""; if(chDeptList.length == 1) // ÀüÃâ°ú Á¤º¸°¡ 1°ÇÀÎ °æ¿ì { chDeptNode = chDeptList.item(0); upmrchdd = chDeptNode.selectSingleNode("chngdeptdd").text; // ÀüÃâÀÏÀÚ upmrchdeptcd = chDeptNode.selectSingleNode("chngdeptcd").text; upmrchdetldeptcd = chDeptNode.selectSingleNode("chngclrsdeptcd").text; if(upmrchdetldeptcd == "") // ¹ÌºñºÐ°ú°¡ °ø¶õÀÎ °æ¿ì ¹Ìºñ°ú¿Í µ¿ÀÏÇÏ°Ô Àû¿ëÇÔ. upmrchdetldeptcd = upmrchdeptcd; //////////////////////////////////////////////////////////////////////////// //// 1. ÀüÃâÀÏÀÚ¿¡ ÇØ´çÇÏ´Â ¹ÌºñºÐ°ú¸¦ ÀúÀå - Start // ÀüÃâÀÏÀÚ¿¡ ÇØ´çÇÏ´Â ¹Ìºñ³»¿ªÀ» Á¶È¸Çؼ­ ÀüÃâÀÏÀÚ¿¡ ÇØ´ç ÇÏ´Â ¹ÌºñºÐ°ú¸¦ ÀúÀåÇÑ´Ù. fGetUnPrepRecListByDay(upmrchdd); // ¹Ìºñ³»¿ªÀÇ ¹Ìºñ°ú¿Í ÀüÃâ°ú¸¦ ºñ±³ÇÑ´Ù. var UnPrepRecListCnt = getNodesetCnt(model, "/root/main/unpreprecinfo/unprepreclist"); var UnPrepRecList = findNodeset(model, "/root/main/unpreprecinfo/unprepreclist"); var UnPrepItem = ""; for(var unidx = 0; unidx < UnPrepRecListCnt; unidx++) { UnPrepItem = UnPrepRecList.item(unidx); var unPrepDeptcd = UnPrepItem.selectSingleNode("orddeptcd").text; // ¹Ìºñ°ú var upmrchdetldeptcdnm = UnPrepItem.selectSingleNode("detldeptnm").text; // ¹ÌºñºÐ°ú if(unPrepDeptcd == upmrchdeptcd) // ÀüÃâ°ú¿Í ¹Ìºñ°ú°¡ °°Àº °æ¿ì¿¡¸¸ ¹ÌºñºÐ°ú¸¦ Àû¿ë { model.makeValue("/root/main/unpreprecinfo/unprepreclist[" + (unidx+1) + "]/status", "l"); model.makeValue("/root/main/unpreprecinfo/unprepreclist[" + (unidx+1) + "]/detldeptcd", upmrchdetldeptcd); /* grd_unprepreclist.isselected(unidx+1) = true; grd_unprepreclist.valueMatrix(grd_unprepreclist.selectedRow(unidx), grd_unprepreclist.colRef("status")) = "l"; grd_unprepreclist.valueMatrix(grd_unprepreclist.selectedRow(unidx), grd_unprepreclist.colRef("detldeptcd")) = upmrchdetldeptcd; */ } } var savenodelist = model.instances(0).selectNodes("/root/main/unpreprecinfo/unprepreclist[status!='']"); if(savenodelist.length > 0) { var srchflag = model.getValue("/root/main/cond/srchflag"); if(srchflag == "pat") { var srchnodelist = model.instances(0).selectNodes("/root/main/cond/unpreppatbase"); } else { var srchnodelist = model.instances(0).selectNodes("/root/main/cond/unprepdrbase"); } var savedata = getNodeListCSV(savenodelist); var srchdata = getNodeListCSV(srchnodelist); model.removeNodeset("/root/send/savedata"); model.makeNode("/root/send/savedata"); model.makeValue("/root/send/savedata", savedata); model.makeValue("/root/send/srchdata", srchdata); submit("TXMRI02101"); // ÀüÃâÀÏÀÚ¿¡ ÇØ´çÇÏ´Â ¹ÌºñºÐ°ú ¾÷µ¥ÀÌÆ® } //// ÀüÃâÀÏÀÚ¿¡ ÇØ´çÇÏ´Â ¹ÌºñºÐ°ú¸¦ ÀúÀå - End //////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// //// 2 .Åð¿ø°ú°¡ ³»°ú ¼¼ºÎ°úÀÎÁö È®ÀÎ var InDeptList = getNodesetCnt(model, "/root/hidden/indeptchklist/hardcd[hardcd = '" + upmrchdeptcd + "']"); if(InDeptList > 0) { upmrchdetldeptcd = upmrchdeptcd; } //////////////////////////////////////////////////////////////////////////// if(upmrchdetldeptcd == "") // ¹ÌºñºÐ°ú°¡ ¾øÀ» °æ¿ì »óÀ§°ú¿Í µ¿ÀÏÇÏ°Ô Ã³¸®ÇÔ. upmrchdetldeptcd = upmrchdeptcd; ///////////////////////////////////////////////////////////////////////////////// //// 3. ÀÔ¿øÀϺÎÅÍ ÀüÃâÀϱîÁö ¼³Á¤ grd_detldeptlist.addItem(); detldeptcdinfoCnt = grd_detldeptlist.rows - grd_detldeptlist.fixedrows; model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/gubun", "CH"); // gubun: N(ÀϹÝ), OP(¼ö¼ú), CH(ÀüÃâ) model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrindd", upmrindd); // ÀÔ¿øÀÏÀÚ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrdschdd", upmrdschdd); // Åð¿øÀÏÀÚ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmropdd", ""); // ¼ö¼úÀÏÀÚ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrchst", upmrindd); // ÀüÃâ ½ÃÀÛÀÏÀÚ upmrchbefrdd = upmrchdd.toDate("YYYYMMDD").getAddDate(-1, "D").getDateFormat("YYYYMMDD"); // ÀüÃâÀÏÀÚ Àü³¯. model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrched", upmrchbefrdd); model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrordeptcd", upmrchdeptcd); // ÀüÃâ°ú model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrdetldeptcd", upmrchdetldeptcd); // ÀüÃâºÐ°ú model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrpid", upmrpid); // ȯÀÚ¹øÈ£ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrindd", upmrindd); // ÀÔ¿øÀÏÀÚ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrcretno", upmrcretno); // cretno model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/perfdrid", ""); // ÁýµµÀÇID bfupmrchdd = upmrchdd; upmrchnextdd = bfupmrchdd.toDate("YYYYMMDD").getAddDate(1, "D").getDateFormat("YYYYMMDD"); // ÀüÃâÀÏÀÚ ´ÙÀ½³¯. //// //////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// //// 4. ¸¶Áö¸· ÀüÃâÀϺÎÅÍ Åð¿øÀϱîÁö ¼³Á¤ grd_detldeptlist.addItem(); detldeptcdinfoCnt = grd_detldeptlist.rows - grd_detldeptlist.fixedrows; // Åð¿ø¹ÌºñºÐ°ú¸¦ °¡Á®¿È. var upmrdschdeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschdeptcd"); // Åð¿ø°ú var upmrdschclrsdeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschclrsdeptcd"); // Åð¿øºÐ°ú //////////////////////////////////////////////////////////////////////////// // Åð¿ø°ú°¡ ³»°ú ¼¼ºÎ°úÀÎÁö È®ÀÎ var InDeptList = getNodesetCnt(model, "/root/hidden/indeptchklist/hardcd[hardcd = '" + upmrdschdeptcd + "']"); if(InDeptList > 0) { upmrdschclrsdeptcd = upmrdschdeptcd; } //////////////////////////////////////////////////////////////////////////// if(upmrdschclrsdeptcd == "") // ¹ÌºñºÐ°ú°¡ ¾øÀ» °æ¿ì »óÀ§°ú¿Í µ¿ÀÏÇÏ°Ô Ã³¸®ÇÔ. upmrdschclrsdeptcd = upmrdschdeptcd; model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/gubun", "CH"); // gubun: N(ÀϹÝ), OP(¼ö¼ú), CH(ÀüÃâ) model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrindd", upmrindd); // ÀÔ¿øÀÏÀÚ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrdschdd", upmrdschdd); // Åð¿øÀÏÀÚ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmropdd", ""); // ¼ö¼úÀÏÀÚ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrchst", upmrchnextdd); // ÀüÃâ ½ÃÀÛÀÏÀÚ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrched", upmrdschdd); model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrordeptcd", upmrdschdeptcd); // Åð¿ø°ú model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrdetldeptcd", upmrdschclrsdeptcd); // Åð¿ø¹ÌºñºÐ°ú model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrpid", upmrpid); // ȯÀÚ¹øÈ£ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrindd", upmrindd); // ÀÔ¿øÀÏÀÚ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrcretno", upmrcretno); // cretno model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/perfdrid", ""); // ÁýµµÀÇID } if(chDeptList.length > 1) // ÀüÃâ°ú Á¤º¸°¡ ¿©·¯ °ÇÀÎ °æ¿ì { // ÀÔ¿øÀϺÎÅÍ ÀüÃâÀϱîÁö ¼³Á¤ var chidx = 0; // Àü°úÁ¤º¸ À妽º chDeptNode = chDeptList.item(chidx); upmrchdd = chDeptNode.selectSingleNode("chngdeptdd").text; upmrchdeptcd = chDeptNode.selectSingleNode("chngdeptcd").text; upmrchdetldeptcd = chDeptNode.selectSingleNode("chngclrsdeptcd").text; if(upmrchdetldeptcd == "") // ¹ÌºñºÐ°ú°¡ °ø¶õÀÎ °æ¿ì ¹Ìºñ°ú¿Í µ¿ÀÏÇÏ°Ô Àû¿ëÇÔ. upmrchdetldeptcd = upmrchdeptcd; //////////////////////////////////////////////////////////////////////////// // ÀüÃâÀÏÀÚ°¡ Áߺ¹µÈ°Ô ¿©·¯°ÇÀÎ Á¶È¸ - Start // ¿©·¯ °ÇÀÎ °æ¿ì ¸¶Áö¸· ÀüÃâÀÏÀÚÀÇ ¹Ìºñ°ú, ¹ÌºñºÐ°ú¸¦ ¾ò¾î¿È. for(var cidx = chidx; cidx < chDeptList.length; cidx++) { chDeptNode = chDeptList.item(cidx); chNextDeptNode = chDeptList.item(cidx+1); // ´ÙÀ½ ³ëµå°¡ null ÀÎÁö È®ÀÎ(Áï, ÇöÀç ³ëµå°¡ ¸¶Áö¸·³ëµåÀÎÁö..) if(chDeptNode == null || chNextDeptNode == null) { chidx = cidx; break; } // Àü°úÁ¤º¸ ³¯Â¥ ºñ±³ // µ¿ÀÏ ³¯Â¥¿¡ 2¹ø ÀÌ»ó Àü°úÇÑ °æ¿ì´Â ÃÖÁ¾ ºÐ°ú³»¿ëÀ¸·Î ¹Ý¿µµÇ°Ô ÇÔ. var bfchdeptday = chDeptNode.selectSingleNode("chngdeptdd").text; var nxchdeptday = chNextDeptNode.selectSingleNode("chngdeptdd").text; if(bfchdeptday == nxchdeptday) { upmrchdeptcd = chNextDeptNode.selectSingleNode("chngdeptcd").text; upmrchdetldeptcd = chNextDeptNode.selectSingleNode("chngclrsdeptcd").text; continue; } else { chidx = cidx; break; } } // ÀüÃâÀÏÀÚ°¡ Áߺ¹µÈ°Ô ¿©·¯°ÇÀÎ Á¶È¸ - End //////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// //// ÀüÃâÀÏÀÚ¿¡ ÇØ´çÇÏ´Â ¹ÌºñºÐ°ú¸¦ ÀúÀå - Start // ÀüÃâÀÏÀÚ¿¡ ÇØ´çÇÏ´Â ¹Ìºñ³»¿ªÀ» Á¶È¸Çؼ­ ÀüÃâÀÏÀÚ¿¡ ÇØ´ç ÇÏ´Â ¹ÌºñºÐ°ú¸¦ ÀúÀåÇÑ´Ù. for(var x = 0; x < chDeptList.length; x++) { var tmpNode = chDeptList.item(x); var tmpNextNode = chDeptList.item(x+1); if(tmpNode != null) var tmpupmrchdd = tmpNode.selectSingleNode("chngdeptdd").text; if(tmpNextNode != null) var tmpupmrchNextdd = tmpNextNode.selectSingleNode("chngdeptdd").text; else tmpupmrchNextdd = ""; if(tmpupmrchdd == tmpupmrchNextdd) continue; var tmpupmrchdeptcd = tmpNode.selectSingleNode("chngdeptcd").text; var tmpupmrchdetldeptcd = tmpNode.selectSingleNode("chngclrsdeptcd").text; if(tmpupmrchdetldeptcd == "") tmpupmrchdetldeptcd = tmpupmrchdeptcd; fGetUnPrepRecListByDay(tmpupmrchdd); // ¹Ìºñ³»¿ªÀÇ ¹Ìºñ°ú¿Í ÀüÃâ°ú¸¦ ºñ±³ÇÑ´Ù. var UnPrepRecListCnt = getNodesetCnt(model, "/root/main/unpreprecinfo/unprepreclist"); var UnPrepRecList = findNodeset(model, "/root/main/unpreprecinfo/unprepreclist"); var UnPrepItem = ""; for(var unidx = 0; unidx < UnPrepRecListCnt; unidx++) { UnPrepItem = UnPrepRecList.item(unidx); var unPrepDeptcd = UnPrepItem.selectSingleNode("orddeptcd").text; // ¹Ìºñ°ú var upmrchdetldeptcdnm = UnPrepItem.selectSingleNode("detldeptnm").text; // ¹ÌºñºÐ°ú if(unPrepDeptcd == tmpupmrchdeptcd) // ÀüÃâ°ú¿Í ¹Ìºñ°ú°¡ °°Àº °æ¿ì¿¡¸¸ ¹ÌºñºÐ°ú¸¦ Àû¿ë { model.makeValue("/root/main/unpreprecinfo/unprepreclist[" + (unidx+1) + "]/status", "l"); model.makeValue("/root/main/unpreprecinfo/unprepreclist[" + (unidx+1) + "]/detldeptcd", tmpupmrchdetldeptcd); /* grd_unprepreclist.isselected(unidx+1) = true; grd_unprepreclist.valueMatrix(grd_unprepreclist.selectedRow(unidx), grd_unprepreclist.colRef("status")) = "l"; grd_unprepreclist.valueMatrix(grd_unprepreclist.selectedRow(unidx), grd_unprepreclist.colRef("detldeptcd")) = upmrchdetldeptcd; */ } } var savenodelist = model.instances(0).selectNodes("/root/main/unpreprecinfo/unprepreclist[status!='']"); if(savenodelist.length > 0) { var srchflag = model.getValue("/root/main/cond/srchflag"); if(srchflag == "pat") { var srchnodelist = model.instances(0).selectNodes("/root/main/cond/unpreppatbase"); } else { var srchnodelist = model.instances(0).selectNodes("/root/main/cond/unprepdrbase"); } var savedata = getNodeListCSV(savenodelist); var srchdata = getNodeListCSV(srchnodelist); model.removeNodeset("/root/send/savedata"); model.makeNode("/root/send/savedata"); model.makeValue("/root/send/savedata", savedata); model.makeValue("/root/send/srchdata", srchdata); submit("TXMRI02101"); // ÀüÃâÀÏÀÚ¿¡ ÇØ´çÇÏ´Â ¹ÌºñºÐ°ú ¾÷µ¥ÀÌÆ® } } //// ÀüÃâÀÏÀÚ¿¡ ÇØ´çÇÏ´Â ¹ÌºñºÐ°ú¸¦ ÀúÀå - End //////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// // Åð¿ø°ú°¡ ³»°ú ¼¼ºÎ°úÀÎÁö È®ÀÎ var InDeptList = getNodesetCnt(model, "/root/hidden/indeptchklist/hardcd[hardcd = '" + upmrchdeptcd + "']"); if(InDeptList > 0) { upmrchdetldeptcd = upmrchdeptcd; } //////////////////////////////////////////////////////////////////////////// if(upmrchdetldeptcd == "") // ¹ÌºñºÐ°ú°¡ ¾øÀ» °æ¿ì »óÀ§°ú¿Í µ¿ÀÏÇÏ°Ô Ã³¸®ÇÔ. upmrchdetldeptcd = upmrchdeptcd; // ÀÔ¿øÀÏÀÚºÎÅÍ ÀüÃâÀÏ Àü³¯±îÁö ¹ÌºñºÐ°ú¸¦ ¼³Á¤ grd_detldeptlist.addItem(); detldeptcdinfoCnt = grd_detldeptlist.rows - grd_detldeptlist.fixedrows; model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/gubun", "CH"); // gubun: N(ÀϹÝ), OP(¼ö¼ú), CH(ÀüÃâ) model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrindd", upmrindd); // ÀÔ¿øÀÏÀÚ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrdschdd", upmrdschdd); // Åð¿øÀÏÀÚ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmropdd", ""); // ¼ö¼úÀÏÀÚ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrchst", upmrindd); // ÀüÃâ ½ÃÀÛÀÏÀÚ upmrchbefrdd = upmrchdd.toDate("YYYYMMDD").getAddDate(-1, "D").getDateFormat("YYYYMMDD"); // ÀüÃâÀÏÀÚ Àü³¯. model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrched", upmrchbefrdd); model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrordeptcd", upmrchdeptcd); // ÀüÃâ°ú model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrdetldeptcd", upmrchdetldeptcd); // ÀüÃâºÐ°ú model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrpid", upmrpid); // ȯÀÚ¹øÈ£ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrindd", upmrindd); // ÀÔ¿øÀÏÀÚ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrcretno", upmrcretno); // cretno model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/perfdrid", ""); // ÁýµµÀÇID //////////////////////////////////////////////////////////////////////////////// // ÀüÃâÀÏ ´ÙÀ½³¯ºÎÅÍ ¸¶Áö¸· ÀüÃâÀϱîÁö loop - Start // ÀÔ¿øÀϺÎÅÍ Ã¹¹øÂ° ÀüÃâÀϱîÁö°¡ 1ȸ ÀüÃâºÐ°ú Àû¿ëÀ̹ǷÎ, // loop ±¸¹®Àº ù¹øÂ° ÀüÃâÀÏ ´ÙÀ½³¯ºÎÅÍ µÎ¹øÂ° ÀüÃâÀÏ Àü³¯±îÁö µÎ¹øÂ° ÀüÃâ°ú¸¦ Àû¿ë var upmrchtommorow = ""; // ÇöÀç³ëµå ÀüÃâÀÏÀÚ ´ÙÀ½³¯ var upmrchyesterday = ""; // ´ÙÀ½³ëµå ÀüÃâÀÏÀÚ Àü³¯ var tmpCurupmrcddd = ""; for(var midx= chidx; midx < chDeptList.length; midx++) { //bfupmrchdd = upmrchdd; //upmrchnextdd = bfupmrchdd.toDate("YYYYMMDD").getAddDate(1, "D").getDateFormat("YYYYMMDD"); // ÀüÃâÀÏÀÚ ´ÙÀ½³¯. chDeptNode = chDeptList.item(midx); chNextDeptNode = chDeptList.item(midx+1); if(chDeptNode == null || chNextDeptNode == null) { chidx = midx; break; } var cur_upmrchdd = chDeptNode.selectSingleNode("chngdeptdd").text; var nex_upmrchdd = chNextDeptNode.selectSingleNode("chngdeptdd").text; upmrchtommorow = cur_upmrchdd.toDate("YYYYMMDD").getAddDate(1, "D").getDateFormat("YYYYMMDD"); // ÇöÀç³ëµå ÀüÃâÀÏÀÚ ´ÙÀ½³¯. upmrchyesterday = nex_upmrchdd.toDate("YYYYMMDD").getAddDate(-1, "D").getDateFormat("YYYYMMDD"); // ´ÙÀ½³ëµå ÀüÃâÀÏÀÚ Àü³¯. tmpCurupmrcddd = cur_upmrchdd; // ÇöÀç ³ëµå ÀüÃâÀÏÀÇ ´ÙÀ½³¯ÀÌ // ´ÙÀ½ ³ëµå ÀüÃâÀϰú µ¿ÀÏÇÑ °æ¿ì ÇöÀç³ëµå´Â ³Ñ¾î°¡°í ´ÙÀ½ ³ëµå°¡ ÇöÀç³ëµå°¡ µÇµµ·Ï ó¸® // 3/9 GS-PSN <-- ÇöÀç³ëµå // 3/10 GS-THS // 3/12 PD-NR if(upmrchtommorow == nex_upmrchdd) continue; // ÀüÃâÀÏÀÚ°¡ Áߺ¹µÈ°Ô ¿©·¯°ÇÀÎ Á¶È¸ // 3/9 GS-PSN <-- ÇöÀç³ëµå // 3/9 GS-THS // 3/12 PD-NR // Áߺ¹µÈ ÀüÃâÀÏÀÚ°¡ ¿©·¯°ÇÀÎ °æ¿ì ¸¶Áö¸· ÀüÃâÀÏÀÚÀÇ ¹Ìºñ°ú, ¹ÌºñºÐ°ú¸¦ ¾ò¾î¿È. for(var cidx = midx; cidx < chDeptList.length; cidx++) { var chDeptNode = chDeptList.item(cidx); var chNextDeptNode = chDeptList.item(cidx+1); // ´ÙÀ½ ³ëµå°¡ null ÀÎÁö È®ÀÎ(Áï, ÇöÀç ³ëµå°¡ ¸¶Áö¸·³ëµåÀÎÁö..) if(chDeptNode == null || chNextDeptNode == null) { //midx = cidx + 1; break; } // Àü°úÁ¤º¸ ³¯Â¥ ºñ±³ // µ¿ÀÏ ³¯Â¥¿¡ 2¹ø ÀÌ»ó Àü°úÇÑ °æ¿ì´Â ÃÖÁ¾ ºÐ°ú³»¿ëÀ¸·Î ¹Ý¿µµÇ°Ô ÇÔ. var bfchdeptday = chDeptNode.selectSingleNode("chngdeptdd").text; var nxchdeptday = chNextDeptNode.selectSingleNode("chngdeptdd").text; if(bfchdeptday == nxchdeptday) // ´ÙÀ½ ÀüÃâÁ¤º¸µµ ÀüÃâÀÏÀÚ°¡ µ¿ÀÏÇÔ. { upmrchdeptcd = chDeptNode.selectSingleNode("chngdeptcd").text; upmrchdetldeptcd = chNextDeptNode.selectSingleNode("chngclrsdeptcd").text; continue; } else // ´ÙÀ½ ÀüÃâÁ¤º¸ÀÇ ÀüÃâÀÏÀÚ°¡ µ¿ÀÏÇÏÁö ¾ÊÀ½. { //midx = cidx + 1; break; } } //upmrchdeptcd = chDeptNode.selectSingleNode("chngdeptcd").text; //upmrchdetldeptcd = chDeptNode.selectSingleNode("chngclrsdeptcd").text; upmrchdeptcd = chNextDeptNode.selectSingleNode("chngdeptcd").text; upmrchdetldeptcd = chNextDeptNode.selectSingleNode("chngclrsdeptcd").text; //////////////////////////////////////////////////////////////////////////// // Åð¿ø°ú°¡ ³»°ú ¼¼ºÎ°úÀÎÁö È®ÀÎ var InDeptList = getNodesetCnt(model, "/root/hidden/indeptchklist/hardcd[hardcd = '" + upmrchdeptcd + "']"); if(InDeptList > 0) { upmrchdetldeptcd = upmrchdeptcd; } //////////////////////////////////////////////////////////////////////////// if(upmrchdetldeptcd == "") // ¹ÌºñºÐ°ú°¡ ¾øÀ» °æ¿ì »óÀ§°ú¿Í µ¿ÀÏÇÏ°Ô Ã³¸®ÇÔ. upmrchdetldeptcd = upmrchdeptcd; grd_detldeptlist.addItem(); detldeptcdinfoCnt = grd_detldeptlist.rows - grd_detldeptlist.fixedrows; model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/gubun", "CH"); // gubun: N(ÀϹÝ), OP(¼ö¼ú), CH(ÀüÃâ) model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrindd", upmrindd); // ÀÔ¿øÀÏÀÚ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrdschdd", upmrdschdd); // Åð¿øÀÏÀÚ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmropdd", ""); // ¼ö¼úÀÏÀÚ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrchst", upmrchtommorow); // ÀüÃâ ½ÃÀÛÀÏÀÚ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrched", upmrchyesterday); // ÀüÃâ Á¾·áÀÏÀÚ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrordeptcd", upmrchdeptcd); // ÀüÃâ°ú model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrdetldeptcd", upmrchdetldeptcd); // ÀüÃâºÐ°ú model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrpid", upmrpid); // ȯÀÚ¹øÈ£ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrindd", upmrindd); // ÀÔ¿øÀÏÀÚ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrcretno", upmrcretno); // cretno model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/perfdrid", ""); // ÁýµµÀÇID } // ÀüÃâÀÏ ´ÙÀ½³¯ºÎÅÍ ¸¶Áö¸· ÀüÃâÀϱîÁö loop - End //////////////////////////////////////////////////////////////////////////////// // ÀüÃâÀϺÎÅÍ Åð¿øÀϱîÁö ¼³Á¤ grd_detldeptlist.addItem(); detldeptcdinfoCnt = grd_detldeptlist.rows - grd_detldeptlist.fixedrows; chDeptNode = chDeptList.item(chidx); upmrchdd = chDeptNode.selectSingleNode("chngdeptdd").text; bfupmrchdd = upmrchdd; upmrchnextdd = bfupmrchdd.toDate("YYYYMMDD").getAddDate(1, "D").getDateFormat("YYYYMMDD"); // ÀüÃâÀÏÀÚ ´ÙÀ½³¯. // Åð¿ø¹ÌºñºÐ°ú¸¦ °¡Á®¿È. var upmrdschdeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschdeptcd"); // Åð¿ø°ú var upmrdschclrsdeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschclrsdeptcd"); // Åð¿øºÐ°ú //////////////////////////////////////////////////////////////////////////// // Åð¿ø°ú°¡ ³»°ú ¼¼ºÎ°úÀÎÁö È®ÀÎ var InDeptList = getNodesetCnt(model, "/root/hidden/indeptchklist/hardcd[hardcd = '" + upmrdschdeptcd + "']"); if(InDeptList > 0) { upmrdschclrsdeptcd = upmrdschdeptcd; } //////////////////////////////////////////////////////////////////////////// if(upmrdschclrsdeptcd == "") // ¹ÌºñºÐ°ú°¡ ¾øÀ» °æ¿ì »óÀ§°ú¿Í µ¿ÀÏÇÏ°Ô Ã³¸®ÇÔ. upmrdschclrsdeptcd = upmrdschdeptcd; model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/gubun", "CH"); // gubun: N(ÀϹÝ), OP(¼ö¼ú), CH(ÀüÃâ) model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrindd", upmrindd); // ÀÔ¿øÀÏÀÚ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrdschdd", upmrdschdd); // Åð¿øÀÏÀÚ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmropdd", ""); // ¼ö¼úÀÏÀÚ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrchst", upmrchnextdd); // ÀüÃâ ½ÃÀÛÀÏÀÚ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrched", upmrdschdd); model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrordeptcd", upmrdschdeptcd); // Åð¿ø°ú model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrdetldeptcd", upmrdschclrsdeptcd); // Åð¿øºÐ°ú model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrpid", upmrpid); // ȯÀÚ¹øÈ£ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrindd", upmrindd); // ÀÔ¿øÀÏÀÚ model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrcretno", upmrcretno); // cretno model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/perfdrid", ""); // ÁýµµÀÇID } } grd_detldeptlist.refresh(); grd_detldeptlist.rebuild(); for(var gidx = 1; gidx < grd_detldeptlist.rows; gidx++) { if(grd_detldeptlist.valueMatrix(gidx, 1) != "") grd_detldeptlist.addStatus(gidx, "insert"); } } } } catch(e) { return false; } return true; } // ÀüÃâÀÏÀÚ¿¡ ÀâÈù ¹Ìºñ³»¿ªÀ» Á¶È¸ÇÑ´Ù. function fGetUnPrepRecListByDay(upmrchdd) { // ÀüÃâÀÏÀÚ¿¡ ÇØ´çÇÏ´Â ¹Ìºñ³»¿ªÀ» Á¶È¸ÇÑ´Ù. model.removeNodeset("/root/send"); model.makeNode("/root/send/reqdata"); model.makeNode("/root/send/dschanalyinfo"); model.makeValue("/root/main/cond/unpreppatbase/pid" , model.getValue("/root/main/dschanalyhist/dschanalyinfo/pid") ); model.makeValue("/root/main/cond/unpreppatbase/indd" , model.getValue("/root/main/dschanalyhist/dschanalyinfo/indd") ); model.makeValue("/root/main/cond/unpreppatbase/cretno", model.getValue("/root/main/dschanalyhist/dschanalyinfo/cretno") ); model.makeValue("/root/main/cond/unpreppatbase/upmrchdd", upmrchdd ); model.makeValue("/root/main/cond/srchflag", "pat"); model.makeValue("/root/main/cond/unpreppatbase/scrnflag", "dschunpreppatbase"); // Åð¿øºÐ¼®¿¡¼­ Á¶È¸ model.copyNode("/root/send/reqdata", "/root/main/cond/unpreppatbase"); submit("TRMRI02106"); } //Åð¿øºÐ¼® ÇÑ È¯ÀÚ¸¦ »èÁ¦ÇÑ´Ù. function fDelete(){ var sPid = model.getValue("/root/main/dschanalyhist/dschanalyinfo/pid"); var sHngnm; var retValue; if(sPid==""){ return; }else{ sHngnm = model.getValue("/root/main/dschanalyhist/dschanalyinfo/hngnm"); retValue= messageBox(sHngnm + "´ÔÀÇ Åð¿ø ºÐ¼®µÈ µ¥ÀÌÅ͸¦ »èÁ¦ÇϽðڽÀ´Ï±î?", "Q999", ""); if(retValue=="6"){ model.makeValue("/root/send/reqdata/pid", model.getValue("/root/main/dschanalyhist/dschanalyinfo/pid")); model.makeValue("/root/send/reqdata/dschdd", model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschdd")); if(submit("TXMRD00480")){ messageBox("»èÁ¦ ", "I001"); model.resetInstanceNode("/root/main"); model.resetInstanceNode("/root/send"); //model.resetInstanceNode("/root/init"); model.resetInstanceNode("/root/temp"); model.resetInstanceNode("/root/hidden"); model.resetInstanceNode("/root/tmp"); model.refresh(); } } } } //2013/01/08 Start /* * 1. Åð¿ø°ú°¡ ¼Ò¾ÆÃ»¼Ò³â°ú * 2. Åð¿øºÐ°ú°¡ PD(ȯÀÚ) ¶Ç´Â NR(Á¤»ó) * 3. »ê¸ð/½Å»ý¾Æ Á¤º¸°¡ Á¸ÀçÇϸ鼭 ½Å»ý¾ÆÀÇ »ê¸ð¹øÈ£°¡ Á¸Àç * 4. ½Å»ý¾ÆÀÇ ±¸ºÐÀÌ ÀÚµ¿À¸·Î Åð¿ø°úÀÇ ºÐ°ú¿Í µ¿ÀÏÇÏ°Ô ¼¼ÆÃ(°æ´ëº´¿ø¿¡¼­ ½Å»ý¾Æ ³ºÀº °æ¿ì) * 5. (2¹ø±îÁö µ¿ÀÏ) »ê¸ð/½Å»ý¾Æ Á¤º¸°¡ Á¸ÀçÇϸ鼭 »ê¸ð¹øÈ£°¡ Á¸ÀçÇÏÁö ¾ÊÀ½ * 6. ½Å»ý¾ÆÀÇ ±¸ºÐÀÌ Á¸ÀçÇÒ °æ¿ì ºí·ÏÅ·(Ÿº´¿ø¿¡¼­ ÀÌ¼ÛµÇ¾î ¿Â È¯ÀÚÀÓ) */ function fnbabychk(){ var deptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/indeptcd"); var clrsdeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/inclrsdeptcd"); /* // NR : 2110500000(Á¤»ó) PD : 2110000000(ȯ¾Æ) if(deptcd=="2110000000" && clrsdeptcd!=""){ // ¼Ò¾ÆÃ»¼Ò³â°úÀ̸鼭 ºÐ°ú°¡ Á¸ÀçÇÒ ½Ã¿¡ var nodecnt = getNodesetCount("/root/main/dschanalyhist/wnmblist"); var womnid=model.getValue("/root/main/dschanalyhist/wnmblist/womnid"); if(nodecnt > 0 && womnid!=""){ // »ê¸ð¹øÈ£°¡ Á¸Àç½Ã if(clrsdeptcd=="2110500000"){ //NR(Á¤»ó¾Æ) model.setValue("/root/main/dschanalyhist/wnmblist/nbabyflag", 1); }else if(clrsdeptcd=="2110000000"){ //PD(ȯ¾Æ) model.setValue("/root/main/dschanalyhist/wnmblist/nbabyflag", 2); } }else if(nodecnt > 0 && womnid==""){// »ê¸ð¹øÈ£°¡ Á¸ÀçÇÏÁö ¾ÊÀ»½Ã model.setValue("/root/main/dschanalyhist/wnmblist/nbabyflag", ""); grd_wnmblist.colDisabled(grd_wnmblist.colRef("nbabyflag"))=true; } }else if(deptcd!="2100000000"){ //ÀÔ¿ø°ú°¡ ¼Ò¾ÆÃ»¼Ò³â°ú°¡ ¾Æ´Ñµ¥ »ê¸ð¹øÈ£°¡ Á¸Àç½Ã¿¡ ¹«Á¶°Ç SB(ȯ¾Æ)·Î ¼¼ÆÃ(»êºÎÀΰú´Â Á¦¿Ü) var nodecnt = getNodesetCount("/root/main/dschanalyhist/wnmblist"); var womnid=model.getValue("/root/main/dschanalyhist/wnmblist/womnid"); if(nodecnt > 0 && womnid!=""){ // »ê¸ð¹øÈ£°¡ Á¸Àç½Ã model.setValue("/root/main/dschanalyhist/wnmblist/nbabyflag", 2); } } */ model.refresh(); } // ¿ø¹« Àü°úÀü½Ç ½ÂÀÎÁ¤º¸ function fPamTranInfo() { model.makeValue("/root/main/dschanalyhist/dschanalyinfo/histstat","N"); modal("SPMRD02300", 1, 810, 340, "SPMRD02300", "/root/main/dschanalyhist", "/root/main/dschanalyhist"); }