/** * @desc : ÀÓ»êºÎº¸°í¼­ È­¸é ÃʱâÈ­ * @ * @param : * @return : * @author : ¾ö¿µ¸¸ * @--------------------------------------------------- */ function fInitialize(){ model.removeNodeset("/root/main/preglist"); //Á¶È¸³¯Â¥ ¹Þ¾Æ¿È var fromdd = ((getCurrentDate().toDate()).getAddDate(-30)).getDateFormat(); var todd = getCurrentDate(); //Áö³­´ÞÀ» º¸¿©ÁÜ model.makeValue("/root/main/cond/fromdd",fromdd); model.makeValue("/root/main/cond/todd",todd); fSearch(); } /** * @desc : ÀÓ»êºÎº¸°í¼­ Á¶È¸ * @ * @param : * @return : * @author : ¾ö¿µ¸¸ * @--------------------------------------------------- */ function fSearch() { model.removeNodeset("/root/main/preglist"); // Á¶È¸ Á¶°ÇÀ» ¼ÂÆÃ ÇÑ´Ù. var fromdd = model.getValue("/root/main/cond/fromdd"); var todd = model.getValue("/root/main/cond/todd"); model.setValue("/root/send/fromdd", fromdd); model.setValue("/root/send/todd", todd); submit("TRMNO04501"); model.refresh(); } /** * @desc : ÀÓ»êºÎº¸°í¼­ »ý¼º * @ * @param : * @return : * @author : ¾ö¿µ¸¸ * @--------------------------------------------------- */ function fCreate() { model.removeNodeset("/root/main/preglist"); // Á¶È¸ Á¶°ÇÀ» ¼ÂÆÃ ÇÑ´Ù. var fromdd = model.getValue("/root/main/cond/fromdd"); var todd = model.getValue("/root/main/cond/todd"); model.setValue("/root/send/fromdd", fromdd); model.setValue("/root/send/todd", todd); submit("TRMNO04502"); for(var i = grd_preg.fixedRows; i < grd_preg.rows; i++) { grd_preg.rowStatus(i) = 1; } model.refresh(); } /** * @desc : ÀÓ»êºÎº¸°í¼­ ÀúÀå * @ * @param : * @return : * @author : ¾ö¿µ¸¸ * @--------------------------------------------------- */ function fSave() { for(var iRow = grd_preg.fixedrows; iRow <= grd_preg.rows - grd_preg.fixedrows; iRow++){ if(model.getValue("/root/main/preginfo/preglist["+iRow+"]/indd") == ""){ messageBox("Áø·áÀÏÀÚ¸¦","C001"); return; } else{ if(model.getValue("/root/main/preginfo/preglist["+iRow+"]/indd").length != 8){ messageBox("8ÀÚ¸® Áø·áÀÏÀÚ¸¦","C001"); return; } } if(model.getValue("/root/main/preginfo/preglist["+iRow+"]/pid") == ""){ messageBox("ȯÀÚ¹øÈ£¸¦","C001"); return; } if(model.getValue("/root/main/preginfo/preglist["+iRow+"]/pname") == ""){ messageBox("ÀÓ»êºÎ¸í¸¦","C001"); return; } if(model.getValue("/root/main/preginfo/preglist["+iRow+"]/rrgstno") == ""){ messageBox("ÁֹιøÈ£¸¦","C001"); return; } else{ if(model.getValue("/root/main/preginfo/preglist["+iRow+"]/rrgstno").length != 13){ messageBox("13ÀÚ¸® ÁֹιøÈ£¸¦","C001"); return; } } if(model.getValue("/root/main/preginfo/preglist["+iRow+"]/zipcd") != "" && model.getValue("/root/main/preginfo/preglist["+iRow+"]/zipcd").length != 6){ messageBox("6ÀÚ¸® ¿ìÆí¹øÈ£¸¦","C001"); return; } } var updateData = grd_preg.getUpdateData(); if(getArrayData(updateData,1,0) == ""){ messageBox("ÀúÀåÇÒ µ¥ÀÌÅ͸¦ ÀÔ·ÂÇÏÁö ","E007"); return; } if(messageBox("ÀúÀå " , "S001") == '6'){ model.makeValue("/root/send/preglist",updateData); if(submit("TXMNO04501")){ fSearch(); } } }