/*function list /* ÀÛ¼ºÀÚ:ÀÌÀ±ÁÖ ¸ñÀû:ÀÓ»ó Áú ÁöÇ¥ È­¸é °³¹ß */ function fIni() { mmbfGetHardCodeInfo("/root/send/reqdata", "/root/init/hardcd", 5700); zbcfGetDeptCodeList(getUserInfo("dutplceinstcd"),"orduseyn","W","/root/init/wardcdlsit","depthngnm","asc"); zbcfGetDeptCodeList(getUserInfo("dutplceinstcd"),"orduseyn","D","/root/init/orddeptlist","depthngnm","asc"); addComboItem("cmb_deptcd", "Àüü", "ALL"); addComboItem("cmb_wardcd", "Àüü", "ALL"); submit("TRMQI03006"); model.setValue("/root/main/cond/searchkind","CI01"); model.setValue("/root/main/cond/ddflag","D"); model.setValue("/root/main/cond/fromdd",getCurrentDate()); model.setValue("/root/main/cond/todd",getCurrentDate()); model.setValue("/root/main/cond/status", "ALL"); model.setValue("/root/main/cond/orddeptcd", "ALL"); model.setValue("/root/main/cond/wardcd", "ALL"); model.refresh(); } function fSearch() { if (combo2.value == "T") { messageBox("[Àü°ú/Àü½Ç]Àº »ý¼ºÁ¶°ÇÀ̸ç, Á¶È¸Á¶°ÇÀ¸·Î »ç¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.", "E999"); return; } submit("TRMQI03000"); model.setValue("/root/temp/gridcimasterflag","true"); model.refresh(); } function fDetl() { model.setValue("/root/main/applycount", ""); var selectedRow = grd_cimaster.row; fGetCIDetailInfo(selectedRow); } function fCreate() { if ( 6 != messageBox("³¯Â¥ ±¸°£ÀÌ ±æ¸é ´Ê¾îÁú ¼ö ÀÖ½À´Ï´Ù ÁøÇàÇÒ±î¿ä?","Q999")) { return; } // if (model.getValue("/root/main/cond/searchkind") == "CI01" && model.getValue("/root/main/cond/ddflag") == "I") { // messageBox("Æó·ÅȯÀÚ ¸¶½ºÅÍ »ý¼º±âÁØÀº Åð¿øÀÏÀÚ·Î ÇØÁֽñ⠹ٶø´Ï´Ù.", "E999"); // model.setFocus("combo2"); // return; // } // // if (model.getValue("/root/main/cond/searchkind") == "CI02" && (model.getValue("/root/main/cond/ddflag") == "I" || model.getValue("/root/main/cond/ddflag") == "D" )) { // if (messageBox("ÁßȯÀÚ ¸¶½ºÅÍ »ý¼º±âÁØÀº ÁßȯÀÚ½Ç Àü°ú/Àü½ÇÀÏÀÚ·Î ¼³Á¤µË´Ï´Ù. Àü°ú/Àü½ÇÀÏÀÚ·Î »ý¼ºÇϽðڽÀ´Ï±î?", "Q999") == "6") { // combo2.value = "T"; // } else { // model.setFocus("combo2"); // return; // } // } if (submit("TXMQI00200")) { var iCnt = model.getValue("/root/create/rslt/cnt"); messageBox("["+iCnt + "]°Ç »ý¼ºµÇ¾ú½À´Ï´Ù.","I999"); } } function fOpenCreatePopUp(){ modal("SPMQI03000"); } /** * ÇöÀç ÁúÁöÇ¥ Detail Á¤º¸ ÀúÀå */ function fSaveDetail() { if (grd_cimaster.row < 1 || model.getValue("/root/main/cimast/instcd") == "") //µðÅ×ÀÏÀÌ ¼±ÅõǾú´ÂÁö üũ. return; if (combo3.value == "A" && model.getValue(grd_cimaster.nodeset+"[pid='"+ model.getValue("/root/main/cimast/pid")+"']/status") == "A") { //¼±Á¤ÀÎ »óÅ¿¡¼­ ÀúÀåÀ̸é "ÀúÀå" »óÅ·ΠÀÚµ¿ º¯°æ.. ³ª¸ÓÁø. ¼±ÅÃÇÑ °ªÀ¸·Î º¯°æ combo3.value = "C"; } copyNodesetType("/root/main/detlinfo/formdetl", "/root/main/detlinfo/formdetl", "replace", model, iviewer_detl.model); model.makeValue("/root/main/detlinfo/cimast", getPrcpNodeListCSV(instance1.selectNodes("/root/main/cimast"))); /* model.makeNode("/root/main/detlinfo/cimast"); copyNodesetType("/root/main/detlinfo/cimast", "/root/main/cimast", "replace", model, model); model.makeValue("/root/main/detlinfo/formdetl", getNodeListCSV(iviewer_detl.instance1.selectSingleNode("/root/main/detlinfo"))); */ if (submit("TXMQI00201")) { fSearch(); } } function fAuto() { var nTotalCount = eval(grd_cimaster.rows - 1 ); var count; var nTrueCount = 0; for(var i = 1; i <= nTotalCount; i ++) { if(model.getValue("/root/main/ciinfo/cilist[" + i + "]/flag") == "true"){ nTrueCount++; } } if(messageBox(nTrueCount + "°ÇÀÇ ÁúÁöÇ¥ ´ë»óÀ» ÀϰýÀúÀåÀ»","Q004") == 6){ model.setValue("/root/main/applycount", ""); for (count = 1; count <= nTotalCount; count++) { if(model.getValue("/root/main/ciinfo/cilist[" + count + "]/flag") == "true"){ if(!fGetCIDetailInfo(count)){ return; } combo3.value = "C"; copyNodesetType("/root/main/detlinfo/formdetl", "/root/main/detlinfo/formdetl", "replace", model, iviewer_detl.model); model.makeValue("/root/main/detlinfo/cimast", getPrcpNodeListCSV(instance1.selectNodes("/root/main/cimast"))); if(!submit("TXMQI00201")) { messageBox("ÀÛ¾÷½Ã ¿¡·¯¹ß»ý","I"); return; } model.setValue("/root/main/applycount", "[ " + count + " / " + nTotalCount + " ]"); cap_count.refresh(); } } messageBox("ÁúÁöÇ¥ ´ë»óÀÇ ÀϰýÀúÀåÀ»", "I002"); fSearch(); } } function fGetiViewerDetlSrc(){ var recflag = model.getValue("/root/main/cimast/recflag"); var sSrc = "SMMQI03900_ÀÓ»óÁúÁöÇ¥_ºóÈ­¸é.xrw"; return sSrc; } function fGetCIDetailInfo(nNodeNum){ model.copyNode("/root/main/cimast", "/root/main/ciinfo/cilist[" + nNodeNum + "]"); iviewer_detl.src = fGetiViewerDetlSrc(); var recflag = model.getValue("/root/main/cond/searchkind"); model.makeValue("/root/send/condition/hardcdno", fGetHardcdno_title(recflag)); if(!submit("TRMQI00104")){ messageBox("TRMQI00104 ¿¡·¯¹ß»ý", "I"); return false ; } model.makeNode("/root/main/headinfo"); copyNodesetType("/root/main/headinfo", "/root/hidden/headinfo","replace", iviewer_detl.model, model); iviewer_detl.model.refresh(); model.makeValue("/root/main/cimast/hardcdno", fGetHardcdno_title(recflag)); if(!submit("TRMQI03001")){ messageBox("TRMQI03001 ¿¡·¯¹ß»ý", "I"); return false; } copyNodesetType("/root/main/detlinfo", "/root/main/detlinfo", "replace", iviewer_detl.model, model); iviewer_detl.model.refresh(); model.refresh(); return true; } function fSetGridCimasterFlag(){ var nTotalCount = eval(grd_cimaster.rows - 1 ); var sFlag = "false" if(nTotalCount > 0){ if(model.getValue("/root/temp/gridcimasterflag") == "true"){ sFlag = "true"; } for(var i = 1; i <= nTotalCount; i ++) { model.setValue("/root/main/ciinfo/cilist[" + i + "]/flag", sFlag); } } } function fSetCIMasterStatus(flag){ var nTotalCount = eval(grd_cimaster.rows - 1 ); var que ="¼±Á¤»óÅ·Πº¯°æÇϽðڽÀ´Ï±î?"; model.setValue("/root/main/applycount", ""); if(nTotalCount > 0){ var nTrueCount = 0; for(var i = 1; i <= nTotalCount; i ++) { if(model.getValue("/root/main/ciinfo/cilist[" + i + "]/flag") == "true"){ nTrueCount++; } } if (flag == "D") { que = "»èÁ¦ÇϽðڽÀ´Ï±î?"; } if(messageBox(nTrueCount + "°ÇÀÇ ÁúÁöÇ¥ ´ë»óÀ» "+que,"Q") == 6){ for (var j = 1; j <= nTotalCount; j++) { if(model.getValue("/root/main/ciinfo/cilist[" + j + "]/flag") == "true"){ model.resetInstanceNode("/root/send/reqdata"); model.copyNode("/root/send/reqdata", "/root/main/ciinfo/cilist[" + j + "]"); model.makeValue("/root/send/reqdata/status", flag); submit("TXMQI00202"); } } messageBox("Á¤»óÀûÀ¸·Î 󸮵Ǿú½À´Ï´Ù", "I"); fSearch(); } } } function fGetHardcdno_title(recflag){ var hardcdno; switch (recflag) { case "CI01": //[Æó·Å]] hardcdno = 5640 ; sTitle = "Æó·Å Àϰý¸ñ·Ï"; break; case "CI02": //[ÁßȯÀÚ]] hardcdno = 5641 ; sTitle = "ÁßȯÀÚ Àϰý¸ñ·Ï"; break; case "CI03": //[¼ö¼ú °¨¿° ¿¹¹æÀû Ç×»ýÁ¦]] hardcdno = 5642 ; sTitle = "¼ö¼ú °¨¿° ¿¹¹æÀû Ç×»ýÁ¦ Àϰý¸ñ·Ï"; break; case "CI04": //[CABG]] hardcdno = 5643 ; sTitle = "CABG Àϰý¸ñ·Ï"; break; case "CI05": //[±Þ¼º½É±Ù°æ»öÁõ]] hardcdno = 5644 ; sTitle = "±Þ¼º½É±Ù°æ»öÁõ Àϰý¸ñ·Ï"; break; case "CI06": //[PCI]] hardcdno = 5645 ; sTitle = "PCI Àϰý¸ñ·Ï"; break; case "CI07": hardcdno = 5646 ; sTitle = "Àϰý¸ñ·Ï"; break; case "CI08": hardcdno = 5647 ; sTitle = "Àϰý¸ñ·Ï"; break; case "CI09": //[Æó¾Ï]] hardcdno = 5648 ; sTitle = "Æó¾ÏÀϰý¸ñ·Ï"; break; case "CI10": //[Æó¾Ï(¼ö¼úȯÀÚ´ë»ó)]] hardcdno = 5649 ; sTitle = "Æó¾Ï(¼ö¼úȯÀÚ´ë»ó)Àϰý¸ñ·Ï"; break; case "CI11": //[À¯¹æ¾Ï]] hardcdno = 5663 ; sTitle = "À¯“‡¾ÏÀϰý¸ñ·Ï"; break; case "CI12": //[Æó·Å(º»¿ø)]] hardcdno = 5639 ; sTitle = "Æó·Å(º»¿ø)Àϰý¸ñ·Ï"; break; } return hardcdno; }