/* °£È£ÀÏÁöŸÀÔII_ºÎ¼­º°SET Á¶È¸ (SMMNR03700.xfm - JScript ) - Version : 1) : Ver.1.00.01 */ var xGrupInfoPath = "/root/main/grupinfo/gruplist"; // ±×·ì °æ·Î var xStmtSetListPath = "/root/main/stmtsetinfo/stmtsetlist"; // ±×·ìº° Áø¼ú¹® °æ·Î var xSelectedStmtListPath = "/root/main/selectedstmtinfo/stmtlist"; // ¼±ÅÃµÈ Áø¼ú¹® °æ·Î var xNStmtSetListPath = "/root/main/stmtsetinfo/nstmtsetlist"; // 20080621 ±èÈ«Á¡ SET Áø¼ú¹® Á¤º¸ var xDStmtSetListPath = "/root/main/stmtsetinfo/dstmtsetlist"; // 20080621 ±èÈ«Á¡ SET Áø¼ú¹® Á¤º¸ var xAStmtSetListPath = "/root/main/stmtsetinfo/astmtsetlist"; // 20080621 ±èÈ«Á¡ SET Áø¼ú¹® Á¤º¸ var xRStmtSetListPath = "/root/main/stmtsetinfo/rstmtsetlist"; // 20080621 ±èÈ«Á¡ SET Áø¼ú¹® Á¤º¸ var xHiddenGrupInfoPath = "/root/hidden/grupinfo/gruplist"; //20080621 ±èÈ«Á¡ Ãß°¡ set±×·ì hidden var xLrgGrupInfoPath = "/root/main/grupinfo/lrggruplist" ;//20080621 ±èÈ«Á¡ Ãß°¡ set±×·ì var xMdlGrupInfoPath = "/root/main/grupinfo/mdlgruplist" ;//20080621 ±èÈ«Á¡ Ãß°¡ set±×·ì var xSmlGrupInfoPath = "/root/main/grupinfo/smlgruplist" ;//20080621 ±èÈ«Á¡ Ãß°¡ set±×·ì var xSmlGrupInfoPath2 = "/root/main/grupinfo/smlgruplist2" ;//20080621 ±èÈ«Á¡ Ãß°¡ set±×·ì var gReturnGrupcd = ""; var gGrupFlag=""; /** * @group : * @ver : 2007.06.20 * @by : ÀÌÀº¿µ * @--------------------------------------------------- * @type : function * @access : public * @desc : È­¸é ÃʱâÈ­ * @param : * @return : * @--------------------------------------------------- */ function fInitialize(){ grd_nursingd.fixedcellcheckbox(0, grd_nursingd.colRef("check")) = true; grd_data.fixedcellcheckbox(0, grd_data.colRef("check")) = true; grd_action.fixedcellcheckbox(0, grd_action.colRef("check")) = true; grd_result.fixedcellcheckbox(0, grd_result.colRef("check")) = true; var sDeptcd = opener.javascript.getParameter("SPMNR03700_Param"); // ºÎ¼­ÄÚµå opener.javascript.setParameter("SPMNR03700_Return",""); model.makeValue("/root/send/deptcd", sDeptcd); // ºÎ¼­ÄÚµå model.makeValue("/root/send/grupflag", "1"); // ±×·ì±¸ºÐ model.removenodeset(xStmtSetListPath); model.removenodeset(xSelectedStmtListPath); fSettingLrgMdlSml("A",grd_lrg,xLrgGrupInfoPath); // SET ±×·ì Á¤º¸ Á¶È¸ // if(submit("TRMNR03701")){ // var sRowCnt = grd_grupinfo.rows-grd_grupinfo.fixedRows; // // for(var i=1; i<=sRowCnt; i++){ // sDepth = eval(model.getValue(xGrupInfoPath+"["+i+"]/depth")); // grd_grupinfo.outlinelevel(i)=sDepth; // } // grd_grupinfo.OutlineCol=1; //¿¬°á¼±ÀÌ Ç¥ÇöµÇ´Â Ä÷³ // grd_grupinfo.OutlineBar=4; //¿¬°á¼± ÇüÅ ¼³Á¤ (+ , - , »ç°¢Çü ¾Èº¸ÀÌ°Ô ÇÏ·Á¸é 0 À¸·Î ¼¼ÆÃ) // grd_grupinfo.TreeColor="gray"; // // ÀÚ½Ä Á¢±â // for(var i=1; i<=sRowCnt; i++){ // sDepth = eval(model.getValue(xGrupInfoPath+"["+i+"]/depth")); // if(sDepth>2){ // grd_grupinfo.iscollapsed(i)=true; //ÀÚ½Ä Æ®¸® Á¢±â // } // } // } } /** * @group : * @ver : 2007.06.20 * @by : ÀÌÀº¿µ * @--------------------------------------------------- * @type : function * @access : public * @desc : SETº° Áø¼ú¹® Á¤º¸¸¦ Á¶È¸ * @param : * @return : * @--------------------------------------------------- */ //function fSearchStmtSetList(){ // var iGrupRow = grd_grupinfo.row; // if(iGrupRow < 1) return; // // ÀÚ½Ä Á¢±â or ÆîÄ¡±â // sDepth = eval(model.getValue(xGrupInfoPath+"["+iGrupRow+"]/depth")); // if(sDepth < 4){ // sRowCnt = grd_grupinfo.rows - grd_grupinfo.fixedrows; // if(grd_grupinfo.iscollapsed(iGrupRow) == true){ // sBoolStatus = false; // }else{ // sBoolStatus = true; // } // // for(var i=iGrupRow; i<=sRowCnt; i++){ // iDepth = eval(model.getValue(xGrupInfoPath+"["+i+"]/depth")); // if(i==iGrupRow){ // grd_grupinfo.iscollapsed(i) = sBoolStatus; // }else if(i != iGrupRow && sDepth < iDepth){ // grd_grupinfo.iscollapsed(i) = sBoolStatus; // }else{ // break; // } // } // } // model.removenode("/root/send"); // model.makeValue("/root/send/grupcd", model.getValue(xGrupInfoPath+"["+iGrupRow+"]/grupcd")); // model.makeValue("/root/send/dnarflag", "%"); // if(submit("TRMNR03702")){ // grd_grupstmtinfo.mergecells = "bycol"; // grd_grupstmtinfo.mergecol(2) = false; // grd_grupstmtinfo.mergecol(3) = false; // grd_grupstmtinfo.allstyle("data","color") = "#000000"; // for(var iRow=grd_grupstmtinfo.fixedrows; iRow<=grd_grupstmtinfo.rows-grd_grupstmtinfo.fixedrows; iRow++){ // if(eval(model.getValue(xStmtSetListPath+"["+iRow+"]/attrcnt"))>0){ // grd_grupstmtinfo.cellstyle("color",iRow,3) = "#33CC33"; // ³ì»ö // } // } // grd_grupstmtinfo.resizeCells(); // } //} /** * @group : * @ver : 2007.06.20 * @by : ÀÌÀº¿µ * @--------------------------------------------------- * @type : function * @access : public * @desc : SETº° Áø¼ú¹® Á¤º¸¸¦ ¼±Åà * @param : * @return : * @--------------------------------------------------- */ function fClickedGridRow(pObj, pListPath, pRow, pCol){ var iRow = pRow; var iCol = pCol; if(iRow < 1 || iRow > pObj.rows) return; if(iCol != pObj.colRef("check")) { if(model.getValue(pListPath+"["+iRow+"]/check") == "true"){ model.setValue(pListPath+"["+iRow+"]/check","false"); }else{ model.setValue(pListPath+"["+iRow+"]/check","true"); } } if( pObj == grd_nursingd ){ fSettingGridBackColorNew(pRow); } } /** * @group : * @ver : 2007.06.20 * @by : ÀÌÀº¿µ * @--------------------------------------------------- * @type : function * @access : public * @desc : Áø¼ú¹® º¸³»±â * @param : * @return : * @--------------------------------------------------- */ function fSendStmtInfo(){ var sStmtCnt = grd_stmtinfo.rows - grd_stmtinfo.fixedrows; var xAttrInfo = "/root/init/recinfo/attrinfo"; // openerÀÇ ¼Ó¼º °æ·Î var xSelectedAttrInfo = "/root/main/attrlist/attrinfo"; // ¼±ÅÃµÈ Áø¼ú¹®ÀÇ ¼Ó¼º °æ·Î var sAttrCnt = 0; var sSelectedAttrCnt = 0; var sAttrInfo = ""; var sStmtInfo = "grupcd¢Ëgrupnm¢Ëstmtcd¢Ëstmtcnts¢Ëattrinfo1¢Ëattrinfo2¢Ëattressnyn¢Ëdnarflag¢Ëattrcnt¢Ëdiagstmtcd¢Ì"; model.removenode("/root/send"); model.makeNode("/root/send/attrinfo"); for(var i=grd_stmtinfo.fixedrows; i<=sStmtCnt; i++){ sAttrInfo = model.getValue(xSelectedStmtListPath+"["+i+"]/attrinfo1").split("¢Á"); sStmtInfo += model.getValue(xSelectedStmtListPath+"["+i+"]/grupcd") + "¢Ë" + model.getValue(xSelectedStmtListPath+"["+i+"]/grupnm") + "¢Ë" + model.getValue(xSelectedStmtListPath+"["+i+"]/stmtcd") + "¢Ë" + model.getValue(xSelectedStmtListPath+"["+i+"]/stmtcnts") + "¢Ë" + model.getValue(xSelectedStmtListPath+"["+i+"]/attrinfo1") + "¢Ë" + model.getValue(xSelectedStmtListPath+"["+i+"]/attrinfo2") + "¢Ë" + model.getValue(xSelectedStmtListPath+"["+i+"]/attressnyn") + "¢Ë" + model.getValue(xSelectedStmtListPath+"["+i+"]/dnarflag") + "¢Ë" + model.getValue(xSelectedStmtListPath+"["+i+"]/attrcnt") + "¢Ë" + model.getValue(xSelectedStmtListPath+"["+i+"]/diagstmtcd") + "¢Ì" // ¹®Àå ³»ÀÇ ¼Ó¼º °¡Á®¿À±â for(var j=0; j 0 ){ // iRtnMsg = messageBox("µ¿ÀÏ °£È£°úÁ¤ Set ºÐ·ù¿¡¼­ ¼±ÅÃµÈ µ¿ÀÏ Áø´ÜÀÌ Á¸ÀçÇÕ´Ï´Ù. ±â·ÏµÉ ¹øÈ£´Â\" "+nodeList.item(0).value+"\"","I009"); // // return "Y"; // } // // if(model.getValue(xNursingRecordListPath+"[recdd='"+sRecDD+"' and rectm='"+sRecTM+"' and stmtcd='"+pStmtCD+"']/stmtcd") != ""){ // iRtnMsg = messageBox("µ¿ÀÏ ½Ã°£ ¶§¿¡ \""+sStmtCnts+"\" ¹®ÀåÀÌ Á¸ÀçÇÕ´Ï´Ù. µî·ÏÀ»","Q003"); // if(iRtnMsg != "6"){ // return "Y"; // } // } for(var i=0; i 0){ model.makeNode(xLrgGrupInfoPath); copyNodesetType(xLrgGrupInfoPath, xHiddenGrupInfoPath, "replace", model, model); } } pCntlObj.refresh(); model.refresh(); }else if( pFlag == "L" && pCntlObj.row > 0){ sSupCd = model.getValue(xLrgGrupInfoPath+"["+ pCntlObj.row +"]/grupcd"); model.removenodeset(xMdlGrupInfoPath); model.removenodeset(xSmlGrupInfoPath); model.removenodeset(xSmlGrupInfoPath2); model.removenode("/root/send"); model.makeValue("/root/send/supcd",sSupCd); model.makeValue("/root/send/grupflag","-"); model.makeValue("/root/send/flag","Y"); if(sGrupFlag == 3){ // ºÎ¼­º°Àº ÀÚ±âÀÇ ºÎ¼­¸¸ Á¶È¸ grd_sml2.visible = true; grd_mdl.caption = "ºÎ¼­^grupcd^deptcd^depth^grupflag"; grd_sml.caption = "Áߺзù^grupcd^deptcd^depth^grupflag"; grd_sml2.caption = "¼ÒºÐ·ù^grupcd^deptcd^depth^grupflag"; //model.makeValue("/root/send/deptcd", getUserInfo("dutplcecd") ); 20080723 ¼Ò¼ÓºÎ¼­¸¸ Á¶È¸µÇ´Â°Ô ¾Æ´Ï¶ó ÇØ´ç ¼Ò¼ÓºÎ¼­¸¦ ¼¿¼±ÅÃ ÇØ´Þ¶ó°í ¿äû ±èÈ«Á¡ }else{ grd_sml2.visible = false; grd_mdl.caption = "Áߺзù^grupcd^deptcd^depth^grupflag"; grd_sml.caption = "¼ÒºÐ·ù^grupcd^deptcd^depth^grupflag"; } if(submit("TRMNR00701")){ if (getNodesetCount(xHiddenGrupInfoPath) > 0){ model.makeNode(xMdlGrupInfoPath); copyNodesetType(xMdlGrupInfoPath, xHiddenGrupInfoPath, "replace", model, model); } } pCntlObj.refresh(); model.refresh(); }else if( pFlag == "M" && pCntlObj.row > 0){ sSupCd = model.getValue(xMdlGrupInfoPath+"["+ pCntlObj.row +"]/grupcd"); model.removenodeset(xSmlGrupInfoPath); model.removenodeset(xSmlGrupInfoPath2); model.removenode("/root/send"); model.makeValue("/root/send/supcd",sSupCd); model.makeValue("/root/send/grupflag","-"); model.makeValue("/root/send/flag","Y"); // if(sGrupFlag == 3){ // ºÎ¼­º°Àº ÀÚ±âÀÇ ºÎ¼­¸¸ Á¶È¸ 20080709 ŸºÎ¼­µµ ºÁ¾ßÇÑ´ë¼­ ÁÖ¼® // model.makeValue("/root/send/deptcd", getUserInfo("dutplcecd") ); // } if(submit("TRMNR00701")){ if (getNodesetCount(xHiddenGrupInfoPath) > 0){ model.makeNode(xSmlGrupInfoPath); copyNodesetType(xSmlGrupInfoPath, xHiddenGrupInfoPath, "replace", model, model); } } pCntlObj.refresh(); model.refresh(); }else if( pFlag == "S" && pCntlObj.row > 0){ sSupCd = model.getValue(xSmlGrupInfoPath+"["+ pCntlObj.row +"]/grupcd"); if(sGrupFlag == 3){ // ºÎ¼­º°Àº ÀÚ±âÀÇ ºÎ¼­¸¸ Á¶È¸ model.removenodeset(xSmlGrupInfoPath2); model.removenode("/root/send"); model.makeValue("/root/send/supcd",sSupCd); model.makeValue("/root/send/grupflag","-"); model.makeValue("/root/send/flag","Y"); if(submit("TRMNR00701")){ if (getNodesetCount(xHiddenGrupInfoPath) > 0){ model.makeNode(xSmlGrupInfoPath2); copyNodesetType(xSmlGrupInfoPath2, xHiddenGrupInfoPath, "replace", model, model); } } }else{ gReturnGrupcd = sSupCd; fSearchSrchTool("StmtSet",pCntlObj.row, sSupCd ); } pCntlObj.refresh(); model.refresh(); }else if( pFlag == "S2" && pCntlObj.row > 0){ sSupCd = model.getValue(xSmlGrupInfoPath2+"["+ pCntlObj.row +"]/grupcd"); gReturnGrupcd = sSupCd; fSearchSrchTool("StmtSet",pCntlObj.row, sSupCd ); } } function fSearchSrchTool(pFlag,pRow,pGrupCd){ var sGrupCd = pGrupCd; var sGrupRow = pRow; grp_dnarset.visible = true; model.removenode("/root/send"); model.makeValue("/root/send/grupcd", sGrupCd); model.makeValue("/root/send/dnarflag","%");//Àüü //model.makeValue("/root/send/dnarflag",model.getValue(xSrchToolCondPath+"/dnarflag"));20080624 ±èÈ«Á¡ if(submit("TRMNR00702")){ //fSettingStmtSet(); fSettingStmtStyle("newsetinfo"); } } //function fSettingStmtSet(pFlag){//pFlag : NDÀϰæ¿ì °£È£Áø´Ü °Ë»ö ÅÇ¿¡¼­ Ä«ÇÇÇÑ´Ù. // model.removenodeset(xNStmtSetListPath); // model.removenodeset(xDStmtSetListPath); // model.removenodeset(xAStmtSetListPath); // model.removenodeset(xRStmtSetListPath); // model.refresh(); // // if (getNodesetCount(xHiddenStmtSetInfoPath) > 0){ // // if( getNodesetCount(xHiddenStmtSetInfoPath+"/nstmtsetlist") > 0 ){ // model.makeNode(xNStmtSetListPath); // copyNodesetType(xNStmtSetListPath, xHiddenStmtSetInfoPath+"/nstmtsetlist", "replace", model, model); // grd_nursingd.resizeCells(); // grd_nursingd.refresh(); // } // // if( getNodesetCount(xHiddenStmtSetInfoPath+"/dstmtsetlist") > 0 ){ // model.makeNode(xDStmtSetListPath); // copyNodesetType(xDStmtSetListPath, xHiddenStmtSetInfoPath+"/dstmtsetlist", "replace", model, model); // grd_data.resizeCells(); // grd_data.refresh(); // } // // if( getNodesetCount(xHiddenStmtSetInfoPath+"/astmtsetlist") > 0 ){ // model.makeNode(xAStmtSetListPath); // copyNodesetType(xAStmtSetListPath, xHiddenStmtSetInfoPath+"/astmtsetlist", "replace", model, model); // grd_action.resizeCells(); // grd_action.refresh(); // } // // if( getNodesetCount(xHiddenStmtSetInfoPath+"/rstmtsetlist") > 0 ){ // model.makeNode(xRStmtSetListPath); // copyNodesetType(xRStmtSetListPath, xHiddenStmtSetInfoPath+"/rstmtsetlist", "replace", model, model); // grd_result.resizeCells(); // grd_result.refresh(); // } // fSettingStmtStyle("newsetinfo"); // } // //model.refresh(); //} /** * @group : * @ver : 2007.04.19 * @by : ÀÌÀº¿µ * @--------------------------------------------------- * @type : function * @access : public * @desc : Áø¼ú¹® ÆùÆ® color ¼³Á¤ - ¼Ó¼ºÀÌ ÀÖ´Â °æ¿ì Áø¼ú¹® ÆùÆ® »ö»óÀ» º¯°æÇÑ´Ù. * @param : pFlag ( setinfo : set, stmtinfo : Áø¼ú¹® °Ë»ö) * @return : * @--------------------------------------------------- */ function fSettingStmtStyle(pFlag){ switch(pFlag){ case "newsetinfo" : // set DARº°·Î ¼Ó¼ºÀÌ Á¸ÀçÇϴ°ÍÀº ÆùÆ®»öº¯°æ20080623 ±èÈ«Á¡ var iTgStmtRow = 0; grd_data.allstyle("data","color") = "#000000"; var sStmtCDList = instance1.selectNodes(xDStmtSetListPath+"[attrcnt > 0]/stmtcd"); for(var idx=0; idx < sStmtCDList.length; idx++){ iTgStmtRow = grd_data.findRow(sStmtCDList.item(idx).value ,1,grd_data.colRef("stmtcd"),true,true); if(iTgStmtRow < 0){ // ¼Â¿¡ ¼Ó¼ºÀÌ ¾øÀ» °æ¿ì pass } else { grd_data.cellstyle("color",iTgStmtRow,grd_data.colRef("stmtcnts")) = "#6600ff"; } } grd_action.allstyle("data","color") = "#000000"; sStmtCDList = instance1.selectNodes(xAStmtSetListPath+"[attrcnt > 0]/stmtcd"); for(var idx=0; idx < sStmtCDList.length; idx++){ iTgStmtRow = grd_action.findRow(sStmtCDList.item(idx).value ,1,grd_action.colRef("stmtcd"),true,true); if(iTgStmtRow < 0){ // ¼Â¿¡ ¼Ó¼ºÀÌ ¾øÀ» °æ¿ì pass } else { grd_action.cellstyle("color",iTgStmtRow,grd_action.colRef("stmtcnts")) = "#6600ff"; } } grd_result.allstyle("data","color") = "#000000"; sStmtCDList = instance1.selectNodes(xRStmtSetListPath+"[attrcnt > 0]/stmtcd"); for(var idx=0; idx < sStmtCDList.length; idx++){ iTgStmtRow = grd_result.findRow(sStmtCDList.item(idx).value ,1,grd_result.colRef("stmtcd"),true,true); if(iTgStmtRow < 0){ // ¼Â¿¡ ¼Ó¼ºÀÌ ¾øÀ» °æ¿ì pass } else { grd_result.cellstyle("color",iTgStmtRow,grd_result.colRef("stmtcnts")) = "#6600ff"; } } model.refresh(); break; } } /** * @group : * @ver : 2008.06.23 * @by : ±èÈ«Á¡ * @--------------------------------------------------- * @type : function * @access : public * @desc : ¼±ÅÃµÈ Áø¼ú¹® º°·Î Ç¥Áذ£È£°úÁ¤ µî·ÏµÈ Áø¼ú¹®¿¡ ¹ÙÅÁ»öÀ» º¯°æ * @param : * @return : * @--------------------------------------------------- */ function fSettingGridBackColorNew(pRow){ var iRow = pRow;//grd_nursingd.selectedRow; var sDNARFlag = model.getValue(xNStmtSetListPath+"["+iRow+"]/dnarflag"); var sCheck = model.getValue(xNStmtSetListPath+"["+iRow+"]/check"); var iTgStmtRow = 0; var sLnkStmt = model.getValue(xNStmtSetListPath+"["+iRow+"]/lnkstmt"); if(sLnkStmt == "") return; var sStmtCD = sLnkStmt.split(","); for(var iStmt=0; iStmt < sStmtCD.length; iStmt++){ iTgStmtRow = grd_data.findRow(sStmtCD[iStmt],1,grd_data.colRef("stmtcd"),true,true); if(iTgStmtRow < 0){ // ¼Â¿¡ ¹­ÀÎ Áø´ÜÀÌ ¾øÀ» °æ¿ì pass } else { chkcnt = model.getValue(xDStmtSetListPath + "["+iTgStmtRow+"]/cnt"); if(sCheck == "true"){ chkcnt ++; }else{ chkcnt --; } model.setValue(xDStmtSetListPath+"["+iTgStmtRow+"]/cnt", chkcnt); if(model.getValue(xDStmtSetListPath+"["+iTgStmtRow+"]/cnt") > 0 ){ grd_data.rowstyle(iTgStmtRow,"data","background-color") = "#efd3e7"; }else { grd_data.rowstyle(iTgStmtRow,"data","background-color") = "#FFFFFF"; } } } for(var iStmt=0; iStmt < sStmtCD.length; iStmt++){ iTgStmtRow = grd_action.findRow(sStmtCD[iStmt],1,grd_action.colRef("stmtcd"),true,true); if(iTgStmtRow < 0){ // ¼Â¿¡ ¹­ÀÎ Áø´ÜÀÌ ¾øÀ» °æ¿ì pass } else { chkcnt = model.getValue(xAStmtSetListPath + "["+iTgStmtRow+"]/cnt"); if(sCheck == "true"){ chkcnt ++; }else{ chkcnt --; } model.setValue(xAStmtSetListPath+"["+iTgStmtRow+"]/cnt", chkcnt); if(model.getValue(xAStmtSetListPath+"["+iTgStmtRow+"]/cnt") > 0 ){ grd_action.rowstyle(iTgStmtRow,"data","background-color") = "#efd3e7"; }else { grd_action.rowstyle(iTgStmtRow,"data","background-color") = "#FFFFFF"; } } } for(var iStmt=0; iStmt < sStmtCD.length; iStmt++){ iTgStmtRow = grd_result.findRow(sStmtCD[iStmt],1,grd_result.colRef("stmtcd"),true,true); if(iTgStmtRow < 0){ // ¼Â¿¡ ¹­ÀÎ Áø´ÜÀÌ ¾øÀ» °æ¿ì pass } else { chkcnt = model.getValue(xRStmtSetListPath + "["+iTgStmtRow+"]/cnt"); if(sCheck == "true"){ chkcnt ++; }else{ chkcnt --; } model.setValue(xRStmtSetListPath+"["+iTgStmtRow+"]/cnt", chkcnt); if(model.getValue(xRStmtSetListPath+"["+iTgStmtRow+"]/cnt") > 0 ){ grd_result.rowstyle(iTgStmtRow,"data","background-color") = "#efd3e7"; }else { grd_result.rowstyle(iTgStmtRow,"data","background-color") = "#FFFFFF"; } } } }