/* Áö½Ãó¹æ ºÒ·¯¿À±â(SPMNR04800.xrw - JScript ) - Version : 1) : Ver.1.00.01 */ var xDoctPrcpListPath = "/root/main/prcpinfo/doctprcplist"; var xCarePrcpListPath = "/root/main/prcpinfo/careprcplist"; /** * @group : * @ver : 2007.08.01 * @by : ÀÌÀº¿µ * @--------------------------------------------------- * @type : function * @access : public * @desc : È­¸é ÃʱâÈ­ * @param : * @return : * @--------------------------------------------------- */ function fInitialize(){ var iRow = 0; model.makeValue("/root/send/deptcd","all"); if(submit("TRMNR04801")){ model.copyNode("/root/temp/prcpinfo","/root/main/prcpinfo"); setTree(grd_doctprcplist,5,2,false); setTree(grd_careprcplist,9,2,false); for(iRow =grd_doctprcplist.fixedrows; iRow <= grd_doctprcplist.rows-grd_doctprcplist.fixedrows; iRow++){ grd_doctprcplist.rowStatus(iRow) = 0; if(model.getValue(xDoctPrcpListPath+"["+iRow+"]/depth") == "1"){ grd_doctprcplist.isReadOnly(iRow,1) = true; } } for(iRow =grd_careprcplist.fixedrows; iRow <= grd_careprcplist.rows-grd_careprcplist.fixedrows; iRow++){ grd_careprcplist.rowStatus(iRow) = 0; if(model.getValue(xCarePrcpListPath+"["+iRow+"]/depth") == "1"){ grd_careprcplist.isReadOnly(iRow,1) = true; } } } } /** * @group : * @ver : 2007.08.01 * @by : ÀÌÀº¿µ * @--------------------------------------------------- * @type : function * @access : public * @desc :±×¸®µå Ŭ¸¯½Ã * @param : * @return : * @--------------------------------------------------- */ function fClinckGridRow(pFlag){ var sDepth = 0; var iRow = 0; var iCol = 0; switch(pFlag){ case "doct" : iRow = grd_doctprcplist.row; iCol = grd_doctprcplist.col; if(iRow < 1) return; if(iCol == 1) return; sDepth = eval(model.getValue(xDoctPrcpListPath+"["+iRow+"]/depth")); if(sDepth == 1) return; if(model.getValue(xDoctPrcpListPath+"["+iRow+"]/check") == "true"){ model.setValue(xDoctPrcpListPath+"["+iRow+"]/check","false"); }else{ model.setValue(xDoctPrcpListPath+"["+iRow+"]/check","true"); } break; case "care" : iRow = grd_careprcplist.row; iCol = grd_careprcplist.col; if(iRow < 1) return; if(iCol == 1) return; sDepth = model.getValue(xCarePrcpListPath+"["+iRow+"]/depth"); if(sDepth == 1) return; if(model.getValue(xCarePrcpListPath+"["+iRow+"]/check") == "true"){ model.setValue(xCarePrcpListPath+"["+iRow+"]/check","false"); fDelGridRow(); }else{ model.setValue(xCarePrcpListPath+"["+iRow+"]/check","true"); fDelGridRow(); } break; } } /** * @group : * @ver : 2007.08.01 * @by : ÀÌÀº¿µ * @--------------------------------------------------- * @type : function * @access : public * @desc : ó¹æ ¼±Åà À̵¿ * @param : * @return : * @--------------------------------------------------- */ function fSendPrcpList(){ var iCarePrcpRow = -1; var sPrcpCD = ""; var sPrcpClsCD1 = ""; var sPrcpClsCD2 = ""; var sPrcpClsCD3 = ""; var iPrcpClsCD1 = ""; var iPrcpClsCD2 = ""; var iPrcpClsCD3 = ""; for(var iRow=grd_doctprcplist.fixedrows; iRow<=grd_doctprcplist.rows-grd_doctprcplist.fixedrows; iRow++){ if(model.getValue(xDoctPrcpListPath+"["+iRow+"]/check") == "true"){ sPrcpCD = model.getValue(xDoctPrcpListPath+"["+iRow+"]/prcpcd"); model.setValue(xDoctPrcpListPath+"["+iRow+"]/check","false"); if(model.getValue(xCarePrcpListPath+"[prcpcd ='"+sPrcpCD+"']/prcpcd") != "") continue; grd_careprcplist.addRow(false); iCarePrcpRow = grd_careprcplist.rows - grd_careprcplist.fixedrows; model.setValue(xCarePrcpListPath+"["+iCarePrcpRow+"]/prcpnm", model.getValue(xDoctPrcpListPath+"["+iRow+"]/prcpnm")); model.setValue(xCarePrcpListPath+"["+iCarePrcpRow+"]/prcpcd", model.getValue(xDoctPrcpListPath+"["+iRow+"]/prcpcd")); model.setValue(xCarePrcpListPath+"["+iCarePrcpRow+"]/instcd", model.getValue(xDoctPrcpListPath+"["+iRow+"]/instcd")); model.setValue(xCarePrcpListPath+"["+iCarePrcpRow+"]/deptcd", "all"); model.setValue(xCarePrcpListPath+"["+iCarePrcpRow+"]/prcpclscd1", model.getValue(xDoctPrcpListPath+"["+iRow+"]/prcpclscd1")); model.setValue(xCarePrcpListPath+"["+iCarePrcpRow+"]/prcpclscd2", model.getValue(xDoctPrcpListPath+"["+iRow+"]/prcpclscd2")); model.setValue(xCarePrcpListPath+"["+iCarePrcpRow+"]/prcpclscd3", model.getValue(xDoctPrcpListPath+"["+iRow+"]/prcpclscd3")); model.setValue(xCarePrcpListPath+"["+iCarePrcpRow+"]/depth", 2); } } grd_careprcplist.refresh(); } /** * @group : * @ver : 2007.08.06 * @by : ÀÌÀº¿µ * @--------------------------------------------------- * @type : function * @access : public * @desc : °£È£setting Áö½Ãó¹æ »èÁ¦ * @param : * @return : * @--------------------------------------------------- */ function fDelGridRow(){ var sCheck = ""; var sStatus = 0; var iRow = grd_careprcplist.row; sCheck = model.getValue(xCarePrcpListPath+"["+iRow+"]/check"); if(sCheck == "true"){ sStatus = grd_careprcplist.rowStatus(iRow); if(sStatus == 1 || sStatus == 3){ grd_careprcplist.deleteRow(iRow,false); }else{ grd_careprcplist.rowStatus(iRow)=4; } }else{ grd_careprcplist.rowStatus(iRow)=0; } } /** * @group : * @ver : 2007.08.06 * @by : ÀÌÀº¿µ * @--------------------------------------------------- * @type : function * @access : public * @desc : °£È£setting Áö½Ãó¹æ ÀúÀå * @param : * @return : * @--------------------------------------------------- */ function fSave(){ var sSaveData = grd_careprcplist.getUpdateData(); if(getArrayData(sSaveData,1,4) == ""){ messageBox("ÀúÀåÇÒ µ¥ÀÌÅͰ¡","I004"); return; } model.removenode("/root/send"); model.makeValue("/root/send/careprcplist",sSaveData); if(submit("TXMNR04801")){ opener.javascript.setParameter("SMMNR04800_SaveFlag","Y"); window.close(); } }