/* - ¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì ÁßȯÀڽǴÙÁ÷Á¾È¸Áø ( SPMMO21401_ÁßȯÀڽǴÙÁ÷Á¾È¸Áø.xrw - JScript ) - ¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì */ var sICURLIST_PATH = "/root/main/icurinfo/icurlist"; /** * @desc : ÁßȯÀÚ½Ç ´ÙÁ÷Á¾ ȸÁø µî·Ï * @ * @param : * @return : * @author : ¾ö¿µ¸¸ * @--------------------------------------------------- */ function fInitialize_SPMMO21401(){ var dutplcecd = getUserInfo("dutplcecd"); // ºÎ¼­ÄÚµå Á¤º¸ °¡Á®¿À±â model.removeNodeset(sICURLIST_PATH); model.setValue("/root/main/cond/fromdd", ((getCurrentDate().toDate()).getAddDate(-7,"D")).getDateFormat()); model.setValue("/root/main/cond/todd", getCurrentDate()); fGethardcdArrayList(new Array("hc452|452", "hc453|453") ,new Array("/root/init", "/root/init")); addComboInstance("/root/init/hc452", "hardcd^hardcdnm", "-^Àüü", "hardcd"); //ÁßȯÀÚ½Ç º´µ¿ Äڵ忡 ÀüüÇ׸ñ Ãß°¡ addComboInstance("/root/init/hc453", "hardcd^hardcdnm", "-^Àüü", "hardcd"); //ÁßȯÀÚ½Ç Á÷Á¾ Äڵ忡 ÀüüÇ׸ñ Ãß°¡ if(getUserInfo("dutplceinstcd") == "032") { // Ä¥°îÀº ÇѰ³ ºÎ¼­ ¹Û¿¡ ¾ø¾î¼­ ¹Ù·Î ¼³Á¤ ÇÔ. 2014.11.03 ¾ö¿µ¸¸ model.setValue("/root/main/cond/wardcd", "2364601000"); } else { model.setValue("/root/main/cond/wardcd", "-"); } model.setValue("/root/main/cond/jobcd", "-"); fReqIcurList() model.refresh(); } /** * @desc : Á¶È¸¹öư Ŭ¸¯ * @ * @param : * @return : * @author : ¾ö¿µ¸¸ * @--------------------------------------------------- */ function fReqIcurList() { if(model.getValue("/root/main/cond/chkuser") == "Y") { model.setValue("/root/main/cond/userid", "-"); } else { model.setValue("/root/main/cond/userid", getUserInfo("userid")); } model.copyNode("/root/send/reqdata", "/root/main/cond"); submit("TRMMO21402"); } /** * @desc : Áø·á´ë»óÀÚ ¸®½ºÆ® Ãâ·Â * @ * @param : * @return : * @author : ±è¿µÇÐ * @--------------------------------------------------- */ function fPrtIcurList() { var sWardCd = model.getValue("/root/main/cond/wardcd"); if( sWardCd == "-" ){ messageBox("ÁßȯÀÚ½ÇÀ» Àüü·Î Á¶È¸ ÇÏ¿© Ãâ·Â ÇÒ¼ö ¾ø½À´Ï´Ù.\nÃâ·ÂÇÏ½Ç ÁßȯÀڽǺ°·Î Á¶È¸ ÇÏ¿© Ãâ·ÂÇϼ¼¿ä.","E") ; return; } var rptid = "RPMMO21401"; var desNode = "/root/main/icurinfo/icurlist"; exeReportPreview(rptid, "XMLSTR", desNode); } /** * @desc : ÇàÃß°¡ Ŭ¸¯ * @ * @param : * @return : * @author : ¾ö¿µ¸¸ * @--------------------------------------------------- */ function fAddIcur() { grd_icurlist.addRow(true, true); var nRow = grd_icurlist.rows; model.setValue(sICURLIST_PATH + "["+eval(nRow-1)+"]/rnddd", getCurrentDate()); model.setValue(sICURLIST_PATH + "["+eval(nRow-1)+"]/rndno", "0"); model.setValue(sICURLIST_PATH + "["+eval(nRow-1)+"]/jobcd", "-"); model.setValue(sICURLIST_PATH + "["+eval(nRow-1)+"]/userid", getUserInfo("userid")); model.setValue(sICURLIST_PATH + "["+eval(nRow-1)+"]/usernm", getUserInfo("usernm")); if(getUserInfo("dutplceinstcd") == "032") { // Ä¥°îÀº ÇѰ³ ºÎ¼­ ¹Û¿¡ ¾ø¾î¼­ ¹Ù·Î ¼³Á¤ ÇÔ. 2014.11.03 ¾ö¿µ¸¸ model.setValue(sICURLIST_PATH + "["+eval(nRow-1)+"]/wardcd", "2364601000"); } else { model.setValue(sICURLIST_PATH + "["+eval(nRow-1)+"]/wardcd", "-"); } model.refresh(); } /** * @desc : Çà»èÁ¦ Ŭ¸¯ * @ * @param : * @return : * @author : ¾ö¿µ¸¸ * @--------------------------------------------------- */ function fDelIcur() { var nRow = grd_icurlist.row; var nStatus = null; if( nRow <= 0 ){ messageBox("»èÁ¦ÇÒ Ç׸ñÀ» ¼±ÅÃÇØÁֽʽÿÀ.","E") ; return; } if(model.getValue ("/root/main/icurinfo/icurlist["+ nRow +"]/cnfyn") == "Y") { messageBox("Àü´ãÀü¹®Àǰ¡ È®ÀÎÇÑ ³»¿ëÀº »èÁ¦ÇÒ ¼ö ¾ø½À´Ï´Ù.", "E") ; return; } if(model.getValue ("/root/main/icurinfo/icurlist["+ nRow +"]/userid") != getUserInfo("userid") && getUserInfo("userid") != "EMR") { messageBox("º»ÀÎÀÇ È¸ÁøÁ¤º¸¸¸ »èÁ¦ °¡´É ÇÕ´Ï´Ù.","E") ; return; } nStatus = grd_icurlist.rowstatus(nRow); if(nStatus == 0) { // ±âÁ¸µ¥ÀÌÅÍ grd_icurlist.rowstatus(nRow) = 4; } else if (nStatus == 1) { // ½Å±Ôµ¥ÀÌÅÍ grd_icurlist.deleteRow(nRow); } else if (nStatus == 4) { // »èÁ¦µ¥ÀÌÅÍ grd_icurlist.rowstatus(nRow) = 0; } model.refresh(); } /** * @desc : ÁßȯÀÚ½Ç È¸Áø Á¤º¸ ÀúÀå * @param : * @return : * @author : ¾ö¿µ¸¸ * @--------------------------------------------------- */ function fSaveIcur(){ var srcNodeList = model.instances(0).selectNodes(sICURLIST_PATH); if( srcNodeList != null) { for ( var i=1; i <= srcNodeList.length; i++ ) { if(model.getValue(sICURLIST_PATH + "[" + i + "]/wardcd") == "-") { messageBox("ÁßȯÀÚ½ÇÀº ¹Ýµå½Ã ¼±Åà ÇÏ¼Å¾ß ÇÕ´Ï´Ù.", "E999" ); return; } if(model.getValue(sICURLIST_PATH + "[" + i + "]/jobcd") == "-") { messageBox("Á÷Á¾Àº ¹Ýµå½Ã ¼±Åà ÇÏ¼Å¾ß ÇÕ´Ï´Ù.", "E999" ); return; } } } model.makeValue("/root/send/savedata/icurlist", grd_icurlist.getUpdateData()); if(!submit("TXMMO21402")) { messageBox("ȸÁø³»¿ª ¼öÁ¤¿¡ ½ÇÆÐ ÇÏ¿´½À´Ï´Ù.", "E999" ); } fReqIcurList(); }