/* ÃÊÁøÈ¯ÀÚ_Áø·áºÎµµ_ÁöÇ¥°ü¸® (SMMNO03200.xfm - JScript ) - Version : 1) : Ver.1.00.01 */ /** * @group : * @ver : 2009.10.19 * @by : ±è¾ç¼ö * @--------------------------------------------------- * @type : function * @access : public * @desc : È­¸é ÃʱâÈ­ * @param : * @return : * @--------------------------------------------------- */ function fInitialize(){ model.removenode("/root/main/outrsrvpatlist"); model.refresh(); var instcd = getUserInfo("dutplceinstcd"); var rslt_ref = "/root/init/orddept"; var dt = getCurrentDate(); //¿À´Ã ³¯Â¥·Î ÃʱâÈ­ ÇÏ´Â ºÎºÐ.(Áø·áÀÏÀÚ¸¦ default·Î ¿À´Ã ³¯Â¥·Î ¼±ÅÃÇÔ) model.setValue("/root/main/cond/ordfromdd", dt); model.setValue("/root/main/cond/ordtodd", dt); // °£È£¿Ü·¡Áø·áºÎ¼­ÄÞº¸ (ƯÁ¤ÇÏÀ§ºÎ¼­¸¦ Æ÷ÇÔ- ºÐ¸¸½Ç, À°¾Æ»ó´ã½Ç, Àΰø½ÅÀå½Ç) zsdfGetCareOutOrderDepartmentList(instcd, rslt_ref, dt); addComboInstance("/root/init/orddept", "deptcd^depthngnm", "0000000000^ÀüüÁø·á°ú", "dept"); //Áø·áºÎ¼­ ÄÞº¸ ÀüüÃß°¡ model.resetInstanceNode("/root/main/cond/orddept"); // °øÅëÄÚµå ½ºÅ©¸³Æ® È£Ãâ //zbcfGetCodeList( new Array("Z0008"), new Array("/root/init/comcd")); var dutplcecd = getUserInfo("dutplcecd"); // ±Ù¹«ÁöºÎ¼­ÄÚµå if (dutplcecd != "") { model.setValue("/root/main/cond/orddeptcd", dutplcecd); // ±Ù¹«ÁöºÎ¼­ÄÚµå fDeptDoctSearch(); // Àǻ縮½ºÆ®Á¶È¸ } model.refresh(); } /** * @group : * @ver : 2007.09.17 * @by : ¹®Ã¢°ï * @--------------------------------------------------- * @type : function * @access : public * @desc : Áø·á°úÀÇ ÀÇ»ç Á¶È¸ * @param : * @return : * @--------------------------------------------------- */ function fDeptDoctSearch(){ cmb_orddr.disabled = false; model.removenode("/root/main/outrsrvpatlist"); model.refresh(); model.makeValue("/root/send/reqdata/orddd", model.getValue("/root/main/cond/ordfromdd")); model.makeValue("/root/send/reqdata/orddeptcd", model.getValue("/root/main/cond/orddeptcd")); var sordclsdeptflag = model.getValue("/root/init/orddept/dept[deptcd = '"+model.getValue("/root/main/cond/orddeptcd")+"']/ordclsdeptflag"); // ¼¾ÅÍ/´ëÇ¥/ºÐ°ú/¼­ºê ±¸ºÐ var ssupdeptcd = model.getValue("/root/init/orddept/dept[deptcd = '"+model.getValue("/root/main/cond/orddeptcd")+"']/supdeptcd"); // »óÀ§ºÎ¼­ÄÚµå var sorddeptkind = model.getValue("/root/init/orddept/dept[deptcd = '"+model.getValue("/root/main/cond/orddeptcd")+"']/orddeptkind"); // ¼¾ÅÍ/´ëÇ¥ ±¸ºÐ var sorddeptflag = ""; if (sorddeptkind == "C") { // ¼¾ÅÍÀ̸é sorddeptflag = "C"; //} else if (sorddeptkind != "C" && sordclsdeptflag == "A") { // ¼¾ÅͰ¡ ¾Æ´Ï¸é¼­ ºÐ°úÀ̸é // sorddeptflag = "A"; } else { // ±×¿Ü¿¡ ±âŸ°ú sorddeptflag = "etc"; } model.setValue("/root/main/cond/ordclsdeptflag",sorddeptflag); model.setValue("/root/main/cond/supdeptcd",ssupdeptcd); model.makeValue("/root/send/reqdata/ordclsdeptflag", sorddeptflag); model.makeValue("/root/send/reqdata/supdeptcd", ssupdeptcd); submit("TRMNO00104"); if(getNodesetCount("/root/init/orddr/orddr") > 0){ for(var i = 0; i < grd_OutRsrvPatList.cols;i++) { grd_OutRsrvPatList.colsort(i) = "asc"; } } else { model.makenode("/root/init/orddr"); model.makenode("/root/init/orddr/orddr"); model.makenode("/root/init/orddr/orddr/userid"); model.makenode("/root/init/orddr/orddr/usernm"); } addComboInstance("/root/init/orddr", "userid^userdepthngnm", "00000000^ÀüüÀÇ»ç", "orddr"); //Áø·áÀÇÄÞº¸ ÀüüÃß°¡ model.resetInstanceNode("/root/main/cond/orddr"); cmb_orddr.refresh(); } /** * @group : * @ver : 2009.10.19 * @by : ±è¾ç¼ö * @--------------------------------------------------- * @type : function * @access : public * @desc : ÃÊÁø ȯÀÚ¸®½ºÆ® Á¶È¸ * @param : * @return : * @--------------------------------------------------- */ function fBtnRefClicked(){ model.removenode("/root/main/outrsrvpatlist"); model.refresh(); var objGrid = switch1.selectedIndex == 0 ? grd_OutRsrvPatList : grd_OutRsrvPatList2; if(cmb_orddept.value == "") { messageBox("Áø·á°ú¸¦ ¼±ÅÃÇÏÁö ","E007"); return; } //Áø·áÀÇ È®ÀÎÃß°¡(Áø·áÀǼ±ÅÃÇÏÁö¾Ê¾Æµµ ÀüüÀÇ»çÁ¶È¸µÊ)-20090910-kys if(cmb_orddr.value == "") { messageBox("Áø·áÀǸ¦ ¼±ÅÃÇÏÁö ","E007"); return; } model.makeValue("/root/main/cond/tabflag", switch1.selectedIndex); model.makenode("/root/send/req"); model.copynode("/root/send/req", "/root/main/cond"); if(submit("TRMNO03201")){ model.setValue("/root/main/cond/cnt", objGrid.rows - objGrid.fixedRows); for ( var nCnt = objGrid.fixedRows; nCnt < objGrid.rows; nCnt++ ) { var strVal = model.getValue("/root/main/outrsrvpatlist/outrsrvpatinfo[" + (nCnt - objGrid.fixedRows + 1) + "]/ordddbf"); if ( strVal == "¿¹¾à´ë±â" ) objGrid.cellstyle("font-weight", nCnt, 9) = "bold"; } opt_cnt.refresh(); } objGrid.refresh(); model.refresh(); } /** * @group : * @ver : 2010.02.05 * @by : ÀÌ¿øÅ * @--------------------------------------------------- * @type : function * @access : public * @desc : Åë°è µ¥ÀÌÅÍ ÀúÀå * @param : * @return : * @--------------------------------------------------- */ function fBtnSaveClicked(){ if ( messageBox("Áø·áÀÏÀÌ ÇöÀçÀÏ ÀÌ»óÀÏ °æ¿ì ÀúÀå °¡´ÉÇÕ´Ï´Ù.\n","Q002") == "7" ) return; model.makeValue("/root/main/cond/tabflag", switch1.selectedIndex); var sReq = "chk¢Ëinstcd¢Ëpid¢Ëorddd¢Ëcretno¢Ëindxitem¢Ëstatus¢Ëremark¢Ëstatus_old¢Ëremark_old¢Ì"; var objGrid = switch1.selectedIndex == 0 ? grd_OutRsrvPatList : grd_OutRsrvPatList2; var strPath = "/root/main/outrsrvpatlist/outrsrvpatinfo"; for ( var nCnt = objGrid.fixedRows; nCnt < objGrid.rows; nCnt++ ) { sReq += model.getValue(strPath + "[" + nCnt + "]/chk") + "¢Ë" + model.getValue(strPath + "[" + nCnt + "]/instcd") + "¢Ë" + model.getValue(strPath + "[" + nCnt + "]/pid") + "¢Ë" + model.getValue(strPath + "[" + nCnt + "]/orddd") + "¢Ë" + model.getValue(strPath + "[" + nCnt + "]/cretno") + "¢Ë" + model.getValue(strPath + "[" + nCnt + "]/indxitem") + "¢Ë" + model.getValue(strPath + "[" + nCnt + "]/status") + "¢Ë" + model.getValue(strPath + "[" + nCnt + "]/remark") + "¢Ë" + model.getValue(strPath + "[" + nCnt + "]/status_old") + "¢Ë" + model.getValue(strPath + "[" + nCnt + "]/remark_old") + "¢Ì"; } model.removenode("/root/send/req"); model.makeValue("/root/send/req" , sReq); submit("TRMNO03202") fBtnRefClicked(); } /** * @group : * @ver : 2010.02.05 * @by : ÀÌ¿øÅ * @--------------------------------------------------- * @type : function * @access : public * @desc : Åë°è µ¥ÀÌÅÍ ¼öÁ¤ Ãë¼Ò * @param : * @return : * @--------------------------------------------------- */ function fBtnResetClicked(){ if ( messageBox("Áø·áÀÏÀÌ ÇöÀçÀÏ ÀÌ»óÀÏ °æ¿ì Ãë¼Ò °¡´ÉÇÕ´Ï´Ù.\n","Q007") == "7" ) return; model.makeValue("/root/main/cond/tabflag", switch1.selectedIndex); var sReq = "chk¢Ëinstcd¢Ëpid¢Ëorddd¢Ëcretno¢Ëindxitem¢Ëstatus¢Ëremark¢Ëstatus_old¢Ëremark_old¢Ì"; var objGrid = switch1.selectedIndex == 0 ? grd_OutRsrvPatList : grd_OutRsrvPatList2; var strPath = "/root/main/outrsrvpatlist/outrsrvpatinfo"; for ( var nCnt = objGrid.fixedRows; nCnt < objGrid.rows; nCnt++ ) { sReq += model.getValue(strPath + "[" + nCnt + "]/chk") + "¢Ë" + model.getValue(strPath + "[" + nCnt + "]/instcd") + "¢Ë" + model.getValue(strPath + "[" + nCnt + "]/pid") + "¢Ë" + model.getValue(strPath + "[" + nCnt + "]/orddd") + "¢Ë" + model.getValue(strPath + "[" + nCnt + "]/cretno") + "¢Ë" + model.getValue(strPath + "[" + nCnt + "]/indxitem") + "¢Ë" + model.getValue(strPath + "[" + nCnt + "]/status") + "¢Ë" + model.getValue(strPath + "[" + nCnt + "]/remark") + "¢Ë" + model.getValue(strPath + "[" + nCnt + "]/status_old") + "¢Ë" + model.getValue(strPath + "[" + nCnt + "]/remark_old") + "¢Ì"; } model.removenode("/root/send/req"); model.makeValue("/root/send/req" , sReq); submit("TRMNO03203") fBtnRefClicked(); } /**======================================================================================================================================== * ¿¢¼¿ÀúÀå ¹öư Ŭ¸¯½Ã =========================================================================================================================================*/ function fBtnExcelClicked() { var objGrid = switch1.selectedIndex == 0 ? grd_OutRsrvPatList : grd_OutRsrvPatList2; if ( objGrid.rows == objGrid.fixedRows ) { messageBox("¿¢¼¿ÆÄÀÏ·Î ÀúÀåÇÒ ¸®½ºÆ® ³»¿ªÀÌ", "I004"); return; } var fileName = window.fileDialog("save", ",", false, "ÇØÇÇÄݰü¸®", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*"); if (fileName != "") objGrid.saveExcel(fileName, "SheetName", false, false, "", "", false); } /** * @desc : ÄÞº¸¹Ú½º¿¡ ¿øÇÏ´Â instance node¿Í value¸¦ ¼³Á¤ * @ * @param : * @event : * @return : * @--------------------------------------------------- */ function addComboInstance(combopath, nodename, nodeval, parentnode){ nodename = nodename.split("^"); nodeval = nodeval.split("^"); if(nodename.length != nodeval.length){ return; } var label = model.instances(0).createElement(nodename[0]); var val = model.instances(0).createElement(nodename[1]); var combo = model.instances(0).createElement(parentnode); label.value = "" + nodeval[0] + ""; val.value = "" + nodeval[1] + ""; combo.appendChild(label); combo.appendChild(val); chkNode = model.instances(0).selectSingleNode(combopath); if(chkNode == null){ model.makeNode(combopath); srcNode = model.instances(0).selectSingleNode(combopath); }else{ srcNode = model.instances(0).selectSingleNode(combopath); } desNode = model.instances(0).selectSingleNode(combopath + "/" + parentnode); srcNode.insertBefore(combo, desNode); model.refresh(); }