function getNodeSetCnt(path) { var insXml = model.instances(0); var nodeList = insXml.selectNodes(path); return nodeList.length; } /** * @desc : ÆûÃʱâÈ­ * @ * @param : * @return : * @authur : ÀÌÀº¿µ 2008.06.12 * @--------------------------------------------------- */ function fFormInit() { //Áø·á°ú/ íƮ°ú ºÒ·¯¿À±â. model.makeValue("/root/send/reqdata/ioflag", "O"); model.makeValue("/root/send/reqdata/orddeptflag", "'D', 'X'"); submit("TRMRC00050"); //°øÅëÄÚµå °¡Á®¿À±â... //M0412:°úº¸°ü»çÀ¯ÄÚµå zbcfGetCodeList(new Array("M0412"), new Array("/root/init/M0412")); model.removeNodeset("/root/main/lendlist"); // ´ëÃâ³»¿ª ÃʱⰪ model.setValue("/root/condition/ioflag" , "O"); model.setValue("/root/condition/appdeptcd" , getUserInfo("dutplcecd")); model.setValue("/root/condition/pid" , ""); model.setValue("/root/condition/deptkeepyn" , "Y"); model.setValue("/root/condition/rendfromdd" , getCurrentDate()); model.setValue("/root/condition/rendtodd" , getCurrentDate()); model.refresh(); } /** * @desc : Â÷Æ® ´ëÃâ ÇöȲ Á¶È¸Çϱâ * @ * @param : * @return : * @authur : ÀÌÀº¿µ 2008.07.21 * @--------------------------------------------------- */ function fGetLendList() { var appdeptcd = model.getValue("/root/condition/appdeptcd"); var rendfromdd = model.getValue("/root/condition/rendfromdd"); var rendtodd = model.getValue("/root/condition/rendtodd"); var deptkeepyn = model.getValue("/root/condition/deptkeepyn"); model.makeValue("/root/send/reqdata/appdeptcd" , appdeptcd); model.makeValue("/root/send/reqdata/rendfromdd" , rendfromdd); model.makeValue("/root/send/reqdata/rendtodd" , rendtodd); model.makeValue("/root/send/reqdata/deptkeepyn" , deptkeepyn); model.makeValue("/root/send/reqdata/apprendcd" , "ALL"); model.refresh(); submit("TRMRC00320"); } /** * @desc : excel ÀúÀå Çϱâ * @ * @param : * @return : * @authur : ÀÌÀº¿µ 2008.07.14 * @--------------------------------------------------- */ function fExcel(gridObj, title){ if (title == null) { title = "" } var fileName = window.fileDialog("save", ",", false, title + "_" + getCurrentDate(), "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*"); if (fileName != "") { gridObj.saveExcel(fileName, "SheetName", true, true, "", "", true); } } /** * @desc : ¸¶¿ì½º ¿À¸¥ÂÊ ¹öư ÆË¾÷â * @ * @param : * @return : * @authur : ÀÌÀº¿µ 2008.03.18 * @--------------------------------------------------- */ function fMouseRghtBtnPopup(gridObj) { if (event.button == 3) { if (gridObj.isCell(event.target) && gridObj.mouseRow >= gridObj.fixedrows) { model.removeNodeset("/root/send/savedata"); window.setPopupMenu(true, "/root/hidden/menu/menu", "label", "func", false); } else { window.setPopupMenu(false); } } else { window.setPopupMenu(false); } } /** * @desc : íƮ ¹Ý³³ ¿ìŬ¸¯½Ã - > °úº¸°ü »çÀ¯ ÀÔ·Â * @ * @param : * @return : * @authur : ÀÌÀº¿µ 2008.07.28 * @--------------------------------------------------- */ function fsetdeptkeep() { if(grd_lendlist.row < 1){ return; } // 2008.01.13. °úº¸°ü»çÀ¯ ÀÔ·ÂÇϱâ... fShowWndIptBox(); } /** * @desc : ÆË¾÷Æû º¸¿©ÁÖ±â.. * @ * @param : * @ * @return : * @authur : ÀÌÀº¿µ 2008.07.28 * @--------------------------------------------------- */ function fShowWndIptBox() { grup_deptkeep.visible = "false"; model.setValue("/root/main/deptkeep/deptkeepcd", "00"); model.setValue("/root/main/deptkeep/deptkeepresn", ""); model.refresh(); if (event.clientY < 600) { grup_deptkeep.attribute("top") = event.clientY-90; } else { grup_deptkeep.attribute("top") = 600; } grup_deptkeep.visible = "true"; } /** * @desc : íƮ ¹Ý³³ ¿ìŬ¸¯½Ã - > °úº¸°ü »çÀ¯ ÀÔ·Â (update) * @ * @param : * @return : * @authur : ÀÌÀº¿µ 2008.07.28 * @--------------------------------------------------- */ function fUpdateDeptKeepresn() { // 2008.01.13. °úº¸°ü»çÀ¯ ÀÔ·ÂÇϱâ... var deptkeepcd = model.getValue("/root/main/deptkeep/deptkeepcd"); var deptkeepresn = model.getValue("/root/main/deptkeep/deptkeepresn"); var savedata ="chrtseqno¢Ëdeptkeepcd¢Ëdeptkeepresn¢Ì"; var dataString = ""; var dataCount = 0; for ( var i = 0; i < grd_lendlist.selectedRows; i++) { // 2009.01.06. sort (Á¤·Ä) ÈÄ ÀνºÅϽº°¡ ¹Ù²î¾î ÀúÀå½Ã ¿À·ù ¹ß»ý ¼öÁ¤ÇÔ. // var chrtseqno = model.getValue("/root/main/lendlist[" + grd_lendlist.selectedrow(i) + "]/chrtseqno"); var chrtseqno = grd_lendlist.textMatrix(grd_lendlist.selectedrow(i), grd_lendlist.colRef("chrtseqno")); dataString = dataString + chrtseqno + "¢Ë" + deptkeepcd + "¢Ë" + deptkeepresn + "¢Ì"; dataCount = dataCount + 1; } if (dataString.length > 0) { alert("ÃÑ " + dataCount + " °Ç °úº¸°ü(»çÀ¯ÀÔ·Â) µÇ¾ú½À´Ï´Ù."); model.makeValue("/root/send/savedata", savedata + dataString); model.refresh(); submit("TXMRC00103"); } grup_deptkeep.visible = false; // ´Ù½Ã Á¶È¸Çϱâ.. fGetLendList(); } /** * @desc : ȯÀÚµî·Ï¹øÈ£ Á¶È¸ ÆË¾÷ * @ * @param : refPid - ȯÀÚ¹øÈ£ Âü°í node path * refPnm - ȯÀÚ¸í Âü°í node path * @return : * @authur : ÀÌÀº¿µ 2008.03.18 * @--------------------------------------------------- */ function fGetPid(refPid, refPnm) { //Á¶È¸°Ç¼ö°¡ 1°ÇÀÏ °æ¿ì ÆË¾÷âÀ» ¹Ù·Î ´Ý´Â´Ù. model.makeValue("/root/hidden/tmp/pidpopupinfo/checkfnexam", "1"); model.makeValue("/root/hidden/tmp/pidpopupinfo/autoflag", "N"); if( model.getValue("/root/hidden/tmp/pidpopupinfo/srchcond") == '' ){ model.makeValue("/root/hidden/tmp/pidpopupinfo/srchcond", '2'); } modal("SPPMC02500", "1","150", "150", "SPPMC02500", "/root/hidden/tmp/pidpopupinfo", "/root/send"); model.resetInstanceNode("/root/source"); //ȯÀÚ¹øÈ£ copy var popupendflag = model.getValue("/root/main/popupendflag"); if (popupendflag == "ok") { model.makeValue(refPid, model.getValue("/root/main/patinfo/patinfolist/pid")); if (refPnm == null) { refPnm = "" } if (refPnm != "") { model.makeValue(refPnm, model.getValue("/root/main/patinfo/patinfolist/hngnm")); } model.refresh(); } } /** * @desc : Â÷Æ® º¸°ü °ü¸®¿¡¼­ ´ëÃâÀÏÀÚ ±â°£ ÄÞº¸ º¸¿©ÁÙ±î? ¸»±î? * @ * @param : * @return : * @authur : ÀÌÀº¿µ 2009.01.06 * @--------------------------------------------------- */ function fLendTermDisabled() { var lendtermdisabled = lendterm_disabled.value; if (lendtermdisabled == "Y") { var today = getCurrentDate(); model.setValue("/root/condition/rendfromdd", today); model.setValue("/root/condition/rendtodd" , today); ipt_fromrendd.disabled = false; ipt_torendd.disabled = false; } else { model.setValue("/root/condition/rendfromdd", ""); model.setValue("/root/condition/rendtodd" , ""); ipt_fromrendd.disabled = true; ipt_torendd.disabled = true; } ipt_fromrendd.refresh(); ipt_torendd.refresh(); }