/** * @desc : È­¸é ÃʱâÈ­ * @ * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fInitialize(){ model.removeNodeset("/root/main/unpreplist"); //¹Ìºñ°ú Á¶È¸ // zbcfGetDeptCodeList(getUserInfo("dutplceinstcd"), "orduseyn", "D", "/root/hidden/deptlist", "depthngnm", "asc"); /* zbcfGetDeptCodeList("012", "orduseyn", "D", "/root/hidden/deptlist", "depthngnm", "asc"); addComboItem("cmb_deptcd","Àüü","-"); var fDate = getCurrentDate(); var fgetdd = fDate.toDate(); var isDate = fgetdd.getAddDate(-1); model.setValue("/root/main/condition/fromdd",isDate.getDateFormat()); model.setValue("/root/main/condition/todd", getCurrentDate()); */ fDocInfoSetting(); //·Î±×ÀÎÇÑ ¹ÌºñÀÇ»çidÀû¿ë model.refresh(); } /** * @desc : ¹Ìºñ ¸®½ºÆ® Á¶È¸ * @ * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fSrchUnprepList() { model.copyNode("/root/send" , "/root/main/condition"); submit("TRMRI02701"); } /** * @desc : ¿¢¼¿·Î ÀúÀå * @ * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ func function fSaveExcel(){ var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*"); if (fileName != "") { grd_unpreplist.saveExcel(fileName, "SheetName", true, true, "", "", "false"); } } /** * @desc : »ç¿ëÀÚ Á¤º¸ ¾ò±â * @id : * @event : xforms-select * @return : void * @author : HIT EMR Team * @--------------------------------------------------- */ function fGetUserInfo(userid,usernm,deptcd ,instcd){ model.makeValue("/root/temp/userinfo/userid", userid); model.makeValue("/root/temp/userinfo/usernm", usernm.getTrim()); model.makeValue("/root/temp/userinfo/deptcd", deptcd); model.makeValue("/root/temp/userinfo/instcd", instcd); } /** * @--------------------------------------------------- * @desc : ¹®ÀÚ¿­ ¾ÕµÚ¿¡ÀÖ´Â °ø¹é Á¦°Å * @param : N/A * @return : °ø¹éÀ» Á¦°ÅÇÑ °á°ú ¹®ÀÚ¿­ * @--------------------------------------------------- */ String.prototype.getTrim = function() { var startPoint = 0; // subString Çϱâ À§ÇÑ ½ÃÀÛ Æ÷ÀÎÆ® var endPoint = this.length; // subString Çϱâ À§ÇÑ ³¡ Æ÷ÀÎÆ® //¹®ÀÚ¿­¾Õ¿¡ °ø¹é¹®ÀÚ°¡ µé¾î ÀÖ´Â Index ÃßÃâ while( (startPoint < endPoint) && (this.charCodeAt(startPoint) == 32) ) { startPoint++; } //¹®ÀÚ¿­µÚ¿¡ °ø¹é¹®ÀÚ°¡ µé¾î ÀÖ´Â Index ÃßÃâ while( (startPoint < endPoint) && (this.charCodeAt(endPoint-1) == 32) ) { endPoint--; } // °ø¹éÀ» Á¦°ÅÇßÀ¸¸é subStringÇÏ¿© °á°ú¹®ÀÚ¿­À» ¸®ÅÏÇϰí Á¦°ÅÇÑ ³»¿ëÀÌ ¾øÀ¸¸é ±×´ë·Î ¸®ÅÏ return ( (startPoint > 0) || (endPoint < this.length) ) ? this.substring(startPoint, endPoint) : this; } /** * @desc : ±â·ÏÁö¿¡ setParameter * @ * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fSetParamFormRec(){ var curRow = grd_unpreplist.row - grd_unpreplist.fixedRows + 1; if(curRow < 1){ return; } var pid = model.getValue("/root/main/unpreplist["+ curRow +"]/pid"); var orddd = model.getValue("/root/main/unpreplist["+ curRow +"]/orddd"); var cretno = model.getValue("/root/main/unpreplist["+ curRow +"]/cretno"); var ioflag = model.getValue("/root/main/unpreplist["+ curRow +"]/indschflag"); var orddrid = model.getValue("/root/main/unpreplist["+ curRow +"]/unprepdrid"); var formcd = model.getValue("/root/main/unpreplist["+ curRow +"]/formcd"); var orddeptcd = model.getValue("/root/main/unpreplist["+ curRow +"]/indschdeptcd"); var formrecseq = model.getValue("/root/main/unpreplist["+ curRow +"]/formrecseq"); var formrecdd = model.getValue("/root/main/unpreplist["+ curRow +"]/formrecdd"); var dschdd = model.getValue("/root/main/unpreplist["+ curRow +"]/dschdd"); //var dschdd = "20080201"; /* 2¿ù 1ÀϺÎÅÍ Àû¿ë var sDate = 20080202; if(Number(dschdd) < sDate ){ messageBox("Á¾À̱â·ÏÀ¸·Î ÀÛ¼ºÇϽþî ÀÇ·áÁ¤º¸ÆÀÀ¸·Î ³»·ÁÁÖ¼¼¿ä. Á¾À̱â·ÏÀ¸·Î ÀÛ¼ºÇϼžßÇϴ ȯÀÚ", "E008"); return; }*/ setParameter("pid", pid); setParameter("orddd", orddd); setParameter("cretno", cretno); setParameter("ioflag", ioflag); setParameter("orddeptcd", orddeptcd); setParameter("orddrid", orddrid); setParameter("SSMMR01100_formrecdd", formrecdd); if(formrecseq == "" || formrecseq == 0){ setParameter("openmode", "newform"); //¿ÀǸðµå´Â ¡°recform¡± setParameter("formcd", formcd); }else{ setParameter("openmode", "recform"); //¿ÀǸðµå´Â "recform" setParameter("formrecseq", formrecseq); //¼­½Ä±â·ÏÅ×À̺íÀÇ formrecseq(±â·Ï¼ø¹ø) } modal("SSMMR01100", 1, 0, 0 ,"", "", ""); //±â·Ï¼ø¹ø var sFormRecSeq = getParameter("SSMMR01100_formrecseq"); var currentDt = getCurrentDate()+getCurrentTime(); //alert("currow->"+curRow +"=sFormRecSeq="+sFormRecSeq); if (sFormRecSeq != "") { model.setValue("/root/main/unpreplist["+ curRow +"]/formrecseq", sFormRecSeq); model.setValue("/root/main/unpreplist["+ curRow +"]/statcert", "2"); model.setValue("/root/main/unpreplist["+ curRow +"]/drcnfmdt", currentDt.substring(0, 14)); //ÀÇ»çÈ®ÀÎÀϽà model.setValue("/root/main/unpreplist["+ curRow +"]/drflag", "drflag"); //ÀÇ»çÈ®ÀÎÀϽñ¸ºÐ grd_unpreplist.rowStatus(curRow) = 2; // ÀúÀå fSetUnprepRec(); } model.refresh(); clearParameter("SSMMR01100_formrecseq"); } /** * @desc : Ãâ·Â±â´É * @ * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fPrintBtn(){ exeReportPreview("RPMRI01800", "XMLSTR"); //exeReportPreview("RPMRI01800", "XMLSTR", "", "", "true", "", "", "", "", "true"); } /** * @desc : ÀÇ»çÁ¤º¸ ¼ÂÆÃ * @ * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fDocInfoSetting(){ //alert(1); if(getUserInfo("jobkindcd") == "0330" ){ //if((getUserInfo("jobkindcd") == "0330") || (getUserInfo("jobkindcd") == "0332")){ //alert(2); model.setValue("/root/main/condition/drnm", getUserInfo("usernm")); model.setValue("/root/main/condition/drid", getUserInfo("userid")); model.refresh(); } }