/* ÁßȯÀÚ½Çȸº¹È¯ÀÚ°ü¸®(SMMNP00730.xfm - JScript ) - Version : 1) : Ver.1.00.01 */ var xPatListPath = "/root/main/patinfo/patlist"; /** * @group : * @ver : 2008.07.01 * @by : dhkim * @--------------------------------------------------- * @type : function * @access : public * @desc : È­¸éÃʱâÈ­ * @param : * @param : * @return : * @--------------------------------------------------- */ function fInit(){ //ÀνºÅϽºÃʱâÈ­ model.removenode('/root/send'); model.removenode('/root/hidden'); model.removenode('/root/main/patinfo'); model.removenode('/root/cond'); model.makenode('/root/send'); model.makenode('/root/hidden'); model.makenode('/root/main/patinfo'); model.makenode('/root/cond/wardcd'); model.makenode('/root/cond/fromdd'); model.makenode('/root/cond/todd'); model.makenode('/root/cond/rdocond'); model.makeValue("/root/send/reqdata/cdgrupid", "094"); model.makeValue("/root/send/reqdata/cdid", ""); model.makeValue("/root/send/reqdata/supcdid", ""); submit("TRMNP04903"); addComboItem("cmb_spcl", "Àü ü", "", "above" ); //Á¶È¸Á¶°Ç ÃʱâÈ­ model.setValue('/root/cond/fromdd', getCurrentDate()); model.setValue('/root/cond/todd', getCurrentDate()); model.setValue('/root/cond/rdocond', '1'); model.refresh(); } /** * @group : * @ver : 2008.07.01 * @by : dhkim * @--------------------------------------------------- * @type : function * @access : public * @desc : ȸº¹È¯ÀÚÁ¶È¸ * @param : * @param : * @return : * @--------------------------------------------------- */ function fSearch(){ var wardcd = model.getValue('/root/cond/wardcd'); var fromdd = model.getValue('/root/cond/fromdd'); var todd = model.getValue('/root/cond/todd'); var rdocond = model.getValue('/root/cond/rdocond'); if(fromdd == null || fromdd == ''){ fromdd = getCurrentDate(); } if(todd == null || todd == ''){ todd = getCurrentDate(); } model.setValue('/root/cond/fromdd', fromdd); model.setValue('/root/cond/todd', todd); model.removenode('/root/send/reqdata'); model.makeValue('/root/send/reqdata/wardcd', wardcd); model.makeValue('/root/send/reqdata/fromdd', fromdd); model.makeValue('/root/send/reqdata/todd', todd); model.makeValue('/root/send/reqdata/rdocond', rdocond); if(!submit('TRMNP00731')){ messageBox('ȸº¹È¯ÀÚÁ¶È¸¸¦', 'E009'); return; } } /** * @group : * @ver : 2007.07.04 * @by : Á¤°æÈ­ * @--------------------------------------------------- * @type : function * @access : public * @desc : ExcelÆÄÀÏ·Î ÀúÀå * @param : * @param : * @return : * @--------------------------------------------------- */ function fSaveExcel(){ file = window.fileDialog("save","","true","","xls","All Files (*.*)|*.*|Excel Files(*.xls)|*.xls"); if(file != "") { grd_patlist.saveExcel(file); } } /** * @group : * @ver : 2008.07.01 * @by : dhkim * @--------------------------------------------------- * @type : function * @access : public * @desc : ȸº¹È¯ÀÚ ÁßȯÀÚ½Ç Åð½Ç½Ã°£ ¼öÁ¤ * @param : * @param : * @return : * @--------------------------------------------------- */ function fSave(){ if(fIsValid()){ model.removenode('/root/send'); model.makeValue('/root/send/reqdata', grd_patlist.getUpdateDataAll('i')); if(!submit('TXMNP00731')){ messageBox('ȸº¹È¯ÀÚ Åð½Ç½Ã°£ÀúÀåÀ»', 'E009'); return; }else{ fSearch(); } } } /** * @group : * @ver : 2008.07.01 * @by : dhkim * @--------------------------------------------------- * @type : function * @access : public * @desc : ȸº¹È¯ÀÚ ÁßȯÀÚ½Ç Åð½Ç½Ã°£ ¼öÁ¤ÇϱâÀü À¯È¿¼ºÃ¼Å© * @param : * @param : * @return : * @--------------------------------------------------- */ function fIsValid(){ var outdd, outtm; var isNull;//±×¸®µå¿¡ ÀüºÎ´Ù ÀÔ·Â ¾ÈµÆÀ»¶§ ÀúÀå ¸·¾ÆÁØ´Ù. for(var i = 1; i <= grd_patlist.rows; i++){ outdd = model.getValue('/root/main/patinfo/patlist[' + i + ']/icuoutroomdd'); outtm = model.getValue('/root/main/patinfo/patlist[' + i + ']/icuoutroomtm'); //Åð½ÇÀÏÀÚ¸¸ ÀÔ·ÂµÇ°í ½Ã°£ÀÌ ÀԷµÇÁö ¾Ê¾ÒÀ»¶§ if(outdd != null && outdd != ''){ if(outdd.length != 8){ messageBox(i + '¹øÂ°ÀÇ È¯ÀÚÀÇ Åð½ÇÀÏÀÚ¸¦ ³¯Â¥Çü½Ä((¿¹)2008-01-01)¿¡ ¸Â°Ô', 'C001'); return false; } if(outtm == null || outtm == ''){ messageBox(i + '¹øÂ°ÀÇ È¯ÀÚÀÇ Åð½Ç½Ã°£À»', 'C001'); return false; }else if(outtm.length != 4){ messageBox(i + '¹øÂ°ÀÇ È¯ÀÚÀÇ Åð½Ç½Ã°£À» ½Ã°£Çü½Ä((¿¹)12:00)¿¡ ¸Â°Ô', 'C001'); return false; } isNull = false; } //Åð½Ç½Ã°£¸¸ ÀԷµǰí ÀÏÀÚ°¡ ÀԷµÇÁö ¾Ê¾ÒÀ»¶§ if(outtm != null && outtm != ''){ if(outtm.length != 4){ messageBox(i + '¹øÂ°ÀÇ È¯ÀÚÀÇ Åð½Ç½Ã°£À» ½Ã°£Çü½Ä((¿¹)12:00)¿¡ ¸Â°Ô', 'C001'); return false; } if(outdd == null || outdd == ''){ messageBox(i + '¹øÂ°ÀÇ È¯ÀÚÀÇ Åð½ÇÀÏÀÚ¸¦', 'C001'); return false; }else if(outdd.length != 8){ messageBox(i + '¹øÂ°ÀÇ È¯ÀÚÀÇ Åð½ÇÀÏÀÚ¸¦ ³¯Â¥Çü½Ä((¿¹)2008-01-01)¿¡ ¸Â°Ô', 'C001'); return false; } isNull = false; } } //±×¸®µå¿¡ ÀÔ·ÂµÈ Åð½Ç½Ã°£, Åð½ÇÀÏÀÚ°¡ ¾ø´Ù. if(isNull){ return false; } return true; }