//공통 변수 var tr_over_clr = "#DCDCDC"; var tr_out_clr = "#FFFFFF"; (function($){ $.isBlank = function(obj){ return(!obj || $.trim(obj) === ""); }; })(jQuery); //공백제거 function trimStr(str){ try { if(str != null) { return str.replace(/^\s+|\s+$/g,''); } else { return ''; } } catch(E) { alert( str ); return str; } } // 숫자형 input 박스에 콤마추가, 숫자만 표시 제한 (class 전체 적용용) function numberClassLimit(){ $('.numlimit').keydown(function(event) { if (event.keyCode && ((event.keyCode > 44 && event.keyCode <= 57) || (event.keyCode >= 96 && event.keyCode <= 105) || event.keyCode == 43 || event.keyCode == 8 || event.keyCode == 110 || event.keyCode == 107 || event.keyCode == 109)) { } else { if(event.keyCode==229){ var str = $(this).val(); str = str.replace(/[^0-9/,/]/g,""); $(this).val(str); } event.preventDefault(); } }).keyup(function(event) { nStr = $(this).val() + ''; nStr = nStr.replace(/,/gi, ''); x = nStr.split('.'); x1 = x[0]; x2 = x.length > 1 ? '.' + x[1] : ''; var rgx = /(\d+)(\d{3})/; while (rgx.test(x1)) { x1 = x1.replace(rgx, '$1' + ',' + '$2'); } $(this).val(x1 + x2); }); } function numberClassLimit_bak(){ $('.numlimit').keypress(function(event) { if (event.keyCode && ((event.keyCode > 44 && event.keyCode <= 57) || (event.keyCode >= 96 && event.keyCode <= 105) || event.keyCode == 43 || event.keyCode == 8 || event.keyCode == 110 || event.keyCode == 107 || event.keyCode == 109)) { } else { event.preventDefault(); } }).keyup(function(event) { if (event.keyCode && ((event.keyCode > 44 && event.keyCode <= 57) || (event.keyCode >= 96 && event.keyCode <= 105) || event.keyCode == 43 || event.keyCode == 8 || event.keyCode == 110 || event.keyCode == 107 || event.keyCode == 109)) { nStr = $(this).val() + ''; nStr = nStr.replace(/,/gi, ''); x = nStr.split('.'); x1 = x[0]; x2 = x.length > 1 ? '.' + x[1] : ''; var rgx = /(\d+)(\d{3})/; while (rgx.test(x1)) { x1 = x1.replace(rgx, '$1' + ',' + '$2'); } $(this).val(x1 + x2); } }); } //숫자형 input 박스에 콤마추가, 숫자만 표시 제한 (단일 객체용) function numberLimit(obj){ $(obj).keypress(function(event) { if (event.keyCode && ((event.keyCode > 44 && event.keyCode <= 57) || (event.keyCode >= 96 && event.keyCode <= 105) || event.keyCode == 43 || event.keyCode == 8 || event.keyCode == 110 || event.keyCode == 107 || event.keyCode == 109)) { // } else { event.preventDefault(); } }).keyup(function(event) { if (event.keyCode && ((event.keyCode > 44 && event.keyCode <= 57) || (event.keyCode >= 96 && event.keyCode <= 105) || event.keyCode == 43 || event.keyCode == 8 || event.keyCode == 110 || event.keyCode == 107 || event.keyCode == 109)) { nStr = $(this).val() + ''; nStr = nStr.replace(/,/gi, ''); x = nStr.split('.'); x1 = x[0]; x2 = x.length > 1 ? '.' + x[1] : ''; var rgx = /(\d+)(\d{3})/; while (rgx.test(x1)) { x1 = x1.replace(rgx, '$1' + ',' + '$2'); } $(this).val(x1 + x2); } }); } // 숫자 타입의 콤마 제거 function numberClassRemoveComma(){ $('.numlimit').each(function() { var val = $(this).val(); $(this).val( val.replace(/\\,/i,'')); }); } //숫자만 표시 function numberOnly(){ $('.numonly').keydown(function(event){ if (event.keyCode && ((event.keyCode > 44 && event.keyCode <= 57) || (event.keyCode >= 96 && event.keyCode <= 105) || event.keyCode == 43 || event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 110 || event.keyCode == 107 || event.keyCode == 109)) { } else { if(event.keyCode==229){ var str = $(this).val(); str = str.replace(/[^0-9/,/]/g,""); $(this).val(str); } event.preventDefault(); } }); } // 전체 파일의 확장자 검사 (msg_view : 잘못된 파일명 alert 처리 여부) function isInvalidFileExtensionAll(msg_view) { var tf = false; $('input[type="file"]').each(function() { var $this = $(this); if( isInvalidFileExtension($this.val(), msg_view, fileExt) ) { tf = true; return false; } }); return tf; } //전체 파일의 확장자 검사 (msg_view : 잘못된 파일명 alert 처리 여부) function isInvalidFileExtensionImage(msg_view) { var tf = false; $('input[type="file"]').each(function() { var $this = $(this); if( isInvalidFileExtension($this.val(), msg_view, imageExt) ) { tf = true; return false; } }); return tf; } //전체 파일의 확장자 검사 (msg_view : 잘못된 파일명 alert 처리 여부) function isInvalidFileExtensionExcel(msg_view) { var tf = false; $('input[type="file"]').each(function() { var $this = $(this); if( isInvalidFileExtension($this.val(), msg_view, excelExt) ) { tf = true; return false; } }); return tf; } // 파일 확장자 제한 (확장자가 다른것이 올라가면 true 리턴) function isInvalidFileExtension(fileName, msg_view, extArray) { try { if(!$.isBlank(fileName)){ var pos = fileName.lastIndexOf('.'); var ext = fileName.substr(pos+1).toLowerCase(); // 확장자가 없거나 제시된 확장자가 아닌 경우 if(pos==-1) { if(msg_view) alert('확장자가 없는 파일은 첨부할 수 없습니다.'); return true; } else if($.inArray(ext, extArray)==-1){ if(msg_view) alert('확장자가 '+ext+' 인 파일은 첨부할 수 없습니다.'); return true; } } } catch(E) {} return false; } // 파일 다운로드 function downloadFile(fileKey){ var iframe = $(''); var fd_frm = $('
').attr({method: 'post', action: '/file/fileDown.do', target: 'iframe'}); fd_frm.append( "" ); $('body').append(iframe); $('body').append(fd_frm); fd_frm.submit(); fd_frm.attr("target","_proc"); } function downloadFile_bak(jobId, jobType, seq){ var iframe = $(''); var fd_frm = $('').attr({method: 'post', action: '/file/fileDown.do', target: 'iframe'}); fd_frm.append( "" ); fd_frm.append( "" ); fd_frm.append( "" ); $('body').append(iframe); $('body').append(fd_frm); fd_frm.submit(); fd_frm.attr("target","_proc"); } //파일 삭제 function deleteFile(jobId, jobType, seq){ var iframe = $(''); var fd_frm = $('').attr({method: 'post', action: '/file/deleteFile.do', target: 'iframe'}); fd_frm.append( "" ); fd_frm.append( "" ); fd_frm.append( "" ); $('body').append(iframe); $('body').append(fd_frm); fd_frm.submit(); fd_frm.attr("target","_proc"); } // 이미지 파일 사이즈 조정 function imageResize(img_obj, max_width, max_height) { if( $(img_obj) != undefined){ var w = $(img_obj).width(); var h = $(img_obj).height(); if(w/max_width < h/max_height) { $(img_obj).width( max_width ); $(img_obj).height( max_width/w*h ); } else { $(img_obj).height( max_height ); $(img_obj).width( max_height/h*w ); } } } // 콤마 추가 function setTextComma(nStr) { nStr += ''; nStr = nStr.replace(/,/gi, ''); x = nStr.split('.'); x1 = x[0]; x2 = x.length > 1 ? '.' + x[1] : ''; var rgx = /(\d+)(\d{3})/; while (rgx.test(x1)) { x1 = x1.replace(rgx, '$1' + ',' + '$2'); } return x1 + x2; } // 숫자 콤마 처리 function addTextComma(event, obj) { try { if (event.keyCode && ((event.keyCode >= 96 && event.keyCode <= 105) || (event.keyCode >= 48 && event.keyCode <= 57) || event.keyCode == 110 || event.keyCode == 190 || event.keyCode == 8)) { nStr = $(obj).val() + ''; nStr = nStr.replace(/,/gi, ''); x = nStr.split('.'); x1 = x[0]; x2 = x.length > 1 ? '.' + x[1] : ''; var rgx = /(\d+)(\d{3})/; while (rgx.test(x1)) { x1 = x1.replace(rgx, '$1' + ',' + '$2'); } $(obj).val(x1 + x2); } else { } } catch(E) {} } /* ' ------------------------------------------------------------------ ' Function : fc_chk_byte(aro_name) ' Description : 입력한 글자수를 체크 ' Argument : Object Name(글자수를 제한할 컨트롤) ' Return : ' ------------------------------------------------------------------ */ //글자수 체크 (체크할 컨트롤, 입력제한 글자수) function fc_chk_byte(aro_name, ari_max){ var ls_str = aro_name.value; // 이벤트가 일어난 컨트롤의 value 값 var li_str_len = ls_str.length; // 전체길이 // 변수초기화 var li_max = ari_max; // 제한할 글자수 크기 var i = 0; // for문에 사용 var li_byte = 0; // 한글일경우는 2 그밖에는 1을 더함 var li_len = 0; // substring하기 위해서 사용 var ls_one_char = ""; // 한글자씩 검사한다 var ls_str2 = ""; // 글자수를 초과하면 제한할수 글자전까지만 보여준다. for(i=0; i< li_str_len; i++){ // 한글자추출 ls_one_char = ls_str.charAt(i); if(escape(ls_one_char).length > 4){ li_byte += 2; // 한글이면 2를 더한다. }else{ li_byte++; // 그밖의 경우는 1을 더한다. } if(li_byte <= li_max){ // 전체 크기가 li_max를 넘지않으면 li_len = i + 1; } } // 전체길이를 초과하면 if(li_byte > li_max){ alert(li_max/2+"자까지 입력가능합니다."); ls_str2 = ls_str.substr(0, li_len); aro_name.value = ls_str2; } //aro_name.focus(); } //선택된 row 색 변경 function rowBgColor(obj, webcolor){ try { $(obj).css('background-color', webcolor); }catch(E){} } // 테이블의 홀수, 짝수 색 변경 function setTableRowColor(table_id){ $('#'+table_id+' tbody > tr:even').css({'background-color':'#FFFFFF'}); $('#'+table_id+' tbody > tr:odd').css({'background-color':'#E9EEF4'}); } //테이블의 홀수, 짝수 색 변경 (멀티 선택 가능한 경우의 처리) //function setTableRowColorMultiSelect(table_id, checkbox_name){ function setTableRowColorMultiSelect(table_id){ $('#'+table_id+' tbody > tr:even').css({'background-color':'#FFFFFF'}); $('#'+table_id+' tbody > tr:odd').css({'background-color':'#E9EEF4'}); $('#'+table_id).find("tr").each(function(){ if( $(this).find("input[name=pk]").is(":checked") ) { $(this).css({'background-color':'#FCDD82'}); } }); } // 윈도우 창 센터 띄우기 위한 계산 function popupCenterOpt(w,h){ var screenLeft=0, screenTop=0; if(!w) w = 600; if(!h) h = 600; var defaultParams = {} screenLeft = 450; screenTop = 240; if (typeof window.screenX != 'undefined' && typeof window.screenY != 'undefined') { screenLeft = window.screenX; screenTop = window.screenY; } else if (typeof window.screenLeft != 'undefined' && typeof window.screenTop != 'undefined') { screenLeft = window.screenLeft; screenTop = window.screenTop; } /* if(typeof window.screenLeft !== 'undefined'){ screenLeft = window.screenLeft; screenTop = window.screenTop; } else if(typeof window.screenX !== 'undefined'){ screenLeft = window.screenX; screenTop = window.screenY; } */ var _width = $(window).width(); var _height = $(window).height(); var features_dict = { toolbar: 'no', location: 'no', directories: 'no', left: screenLeft + (_width - w) / 2, top: screenTop + (_height - h) / 2, status: 'no', menubar: 'no', scrollbars: 'yes', resizable: 'no', menu: 'no', width: w, height: h }; features_arr = []; for(var k in features_dict) { features_arr.push(k+'='+features_dict[k]); } features_str = features_arr.join(','); return features_str; } //윈도우 창 센터 띄우기 위한 계산(스크롤추가) function popupCenterOpt_up(w,h){ var screenLeft=0, screenTop=0; if(!w) w = 600; if(!h) h = 600; var defaultParams = {} screenLeft = 450; screenTop = 240; if (typeof window.screenX != 'undefined' && typeof window.screenY != 'undefined') { screenLeft = window.screenX; screenTop = window.screenY; } else if (typeof window.screenLeft != 'undefined' && typeof window.screenTop != 'undefined') { screenLeft = window.screenLeft; screenTop = window.screenTop; } /* if(typeof window.screenLeft !== 'undefined'){ screenLeft = window.screenLeft; screenTop = window.screenTop; } else if(typeof window.screenX !== 'undefined'){ screenLeft = window.screenX; screenTop = window.screenY; } */ var _width = $(window).width(); var _height = $(window).height(); var features_dict = { toolbar: 'no', location: 'no', directories: 'no', left: screenLeft + (_width - w) / 2, top: screenTop + (_height - h) / 2, status: 'no', menubar: 'no', scrollbars: 'yes', resizable: 'yes ', menu: 'no', width: w, height: h }; features_arr = []; for(var k in features_dict) { features_arr.push(k+'='+features_dict[k]); } features_str = features_arr.join(','); return features_str; } function popupCenterOpt_resizable(w,h){ var screenLeft=0, screenTop=0; if(!w) w = 600; if(!h) h = 600; var defaultParams = {} screenLeft = 450; screenTop = 240; if (typeof window.screenX != 'undefined' && typeof window.screenY != 'undefined') { screenLeft = window.screenX; screenTop = window.screenY; } else if (typeof window.screenLeft != 'undefined' && typeof window.screenTop != 'undefined') { screenLeft = window.screenLeft; screenTop = window.screenTop; } /* if(typeof window.screenLeft !== 'undefined'){ screenLeft = window.screenLeft; screenTop = window.screenTop; } else if(typeof window.screenX !== 'undefined'){ screenLeft = window.screenX; screenTop = window.screenY; } */ var _width = $(window).width(); var _height = $(window).height(); var features_dict = { toolbar: 'no', location: 'no', directories: 'no', left: screenLeft + (_width - w) / 2, top: screenTop + (_height - h) / 2, status: 'no', menubar: 'no', scrollbars: 'yes', resizable: 'yes', menu: 'no', width: w, height: h }; features_arr = []; for(var k in features_dict) { features_arr.push(k+'='+features_dict[k]); } features_str = features_arr.join(','); return features_str; } // 팝업 생성 function windowOpen(url, popup_id, w, h){ if(!popup_id) popup_id = 'QS_POP_COM'; features_str = popupCenterOpt(w,h); //alert(features_str); //var pwin = window.open(url, popup_id, features_str); //pwin.focus(); window.open(url, popup_id, features_str); return false; } //팝업 생성 (폼 데이터 넘김) function windowOpenFrm(frm_id, url, popup_id, w, h){ if(!popup_id) popup_id = 'QS_POP_COM'; features_str = popupCenterOpt(w,h); //var pwin = window.open('', popup_id, features_str); var pwin = window.open('', popup_id, features_str); $('#'+frm_id).attr('target',popup_id); $('#'+frm_id).attr('action',url); $('#'+frm_id).submit(); //pwin.focus(); return false; } //팝업 생성 (폼 데이터 넘김) - 세팅될 함수명 추가 function windowOpenFrm(frm_id, url, popup_id, w, h, parent_fn_name){ if(!popup_id) popup_id = 'QS_POP_COM'; features_str = popupCenterOpt(w,h); //var pwin = window.open('', popup_id, features_str); window.open('', popup_id, features_str); $('#'+frm_id).attr('target',popup_id); $('#'+frm_id).attr('action',url); $('#parent_fn_name').val(parent_fn_name); $('#'+frm_id).submit(); //pwin.focus(); return false; } //팝업 생성 (폼 데이터 넘김) - 세팅될 함수명 추가 스크롤처리 function windowOpenFrm_up(frm_id, url, popup_id, w, h, parent_fn_name){ if(!popup_id) popup_id = 'QS_POP_COM'; features_str = popupCenterOpt_up(w,h); //var pwin = window.open('', popup_id, features_str); window.open('', popup_id, features_str); $('#'+frm_id).attr('target',popup_id); $('#'+frm_id).attr('action',url); $('#parent_fn_name').val(parent_fn_name); $('#'+frm_id).submit(); //pwin.focus(); return false; } //상세 팝업 생성 function windowOpenQmDmz(url, popup_id, w, h){ popup_id = 'QS_POP_VIEW'; features_str = popupCenterOpt(w,h); //var pwin = window.open(url, popup_id, features_str); //pwin.focus(); window.open(url, popup_id, features_str); return false; } //상세 팝업 생성 (폼 데이터 넘김) function windowOpenFrmQmDmz(frm_id, url, popup_id, w, h){ alert('a'); popup_id = 'QS_POP_VIEW'; features_str = popupCenterOpt(w,h); //var pwin = window.open('', popup_id, features_str); window.open('', popup_id, features_str); $('#'+frm_id).attr('target',popup_id); $('#'+frm_id).attr('action',url); $('#'+frm_id).submit(); //pwin.focus(); return false; } function windowOpenFrmQmDmz_resizable(frm_id, url, popup_id, w, h){ popup_id = 'QS_POP_VIEW'; features_str = popupCenterOpt_resizable(w,h); //var pwin = window.open('', popup_id, features_str); window.open('', popup_id, features_str); $('#'+frm_id).attr('target',popup_id); $('#'+frm_id).attr('action',url); $('#'+frm_id).submit(); //pwin.focus(); return false; } //상세 팝업 생성 (폼 데이터 넘김) - 세팅될 함수명 추가 function windowOpenFrmQmDmz(frm_id, url, popup_id, w, h, parent_fn_name){ popup_id = 'QS_POP_VIEW'; features_str = popupCenterOpt(w,h); //var pwin = window.open('', popup_id, features_str); window.open('', popup_id, features_str); $('#'+frm_id).attr('target',popup_id); $('#'+frm_id).attr('action',url); $('#parent_fn_name').val(parent_fn_name); $('#'+frm_id).submit(); //pwin.focus(); return false; } // 선택된 체크 박스 개수 리턴 function getCheckedCount(chk_name){ var cnt = 0; try { cnt = $('input[name='+chk_name+']:checked').length; }catch(E){ } return cnt; } function chkFileExt(file) { //var existExt = "exe,com,jsp,php,php3,asp,aspx,cgi,inc,pl,sh,bat,dll,js,class"; var existExt = "alz,dgn,doc,dwg,gif,htm,hwp,jpg,mpp,pdf,ppt,tif,txt,vsd,xls,xml,zip,xlsx,pptx,docx"; var existExtArr = existExt.split(","); var isChkFileYN = "N"; //alert(file.value); if (file.value != null && file.value.toString() != "") { var fileExtension = file.value.substring(file.value.lastIndexOf(".")+1).toLowerCase(); for(var i=0; i < existExtArr.length; i++) { if (fileExtension == existExtArr[i]) { isChkFileYN = "Y"; break; } } if (isChkFileYN != "Y") { alert('등록 가능한 첨부파일 확장자는 아래 20개 입니다.\n ALZ, DGN, DOC, DWG, GIF, HTM, HWP, JPG, MPP \n PDF, PPT, TIF, TXT, VSD, XLS, XML, ZIP, XLSX, PPTX, DOCX'); file.select(); document.selection.clear(); //file.remove(); } } } // 파일 첨부용 파일 선택 row 만들기 function fileSelectRowAdd(file_table_id, input_file_name){ var row_count = $('#'+file_table_id +' > tbody tr').length; $('#'+ file_table_id +' > tbody').append(""+ ""); } //파일 첨부용 파일 선택 row 삭제 function fileSelectRowDel(file_table_id, file_input_id){ $("#"+file_table_id +" > tbody tr").each( function() { if($(this).find("#"+file_input_id).is(":checked")) { $(this).remove(); } } ); } // sorting, 해더 고정 테이블 처리 function sortAndFixedTableMake(table_id){ // 테이블 홀수 짝수 색 변경 setTableRowColor(table_id); // 테이블 헤더 고정 처리 $('#'+table_id).fixedHeaderTable(); //tablesorter와 fixedheadertable을 같이 사용할 경우, sorter의 클릭 이벤트를 수행하기 위한 조치 try { $('.fht-thead th').each(function(index){ var $cloneTH = $(this); var $trueTH = $($('#'+table_id+' thead th')[index]); $cloneTH.click(function(){ $trueTH.click(); }); }); }catch(E){} } function ShowProgressLayer1(Save_Type){ var x= 0; var y =0; if(Save_Type == 'T'){ x = 600; y = 500; }else{ x = 600; y = 500 ; } PROGRESSLAYER.style.visibility = "visible"; PROGRESSLAYER.style.posLeft = x; PROGRESSLAYER.style.posTop = y; } function ShowProgressLayer(){ var x = 10; var y = 10; PROGRESSLAYER.style.visibility = "visible"; PROGRESSLAYER.style.posLeft = x; PROGRESSLAYER.style.posTop = y; } function transJsonMapObj(json, colList){ var rtnObj = {}; for(var i=0; i"; }else if(extObjVal.charCodeAt(k)==13){ reExtObjVal = reExtObjVal+""; }else{ reExtObjVal = reExtObjVal+extObjVal[k]; } } extObjVal = reExtObjVal; rtnObj[colList[i]] = extObjVal; }else{ rtnObj[colList[i]] = ""; } } return rtnObj; } function makeHtmlTagMapObj(tbId, colList){ var tempStr = ""; tbId = "#"+tbId; for(var j=0; j0){ var extObj = $(this).children("td").children("[name="+colList[j]+"]"); var extObjType = $(extObj)[0].type; if(extObjType=="input"){ extObjType = extObj.attr("type"); } var findStr = ""; if(extObjType=="radio") { findStr = "[name="+colList[j]+"]:checked"; }else{ findStr = "[name="+colList[j]+"]"; } var extObjVal = $(this).children("td").children(findStr).val(); if(extObjVal == "" || extObjVal == undefined) { extObjVal = ""; } if(extObjType=="textarea"){ reExtObjVal = ""; for(var k=0; k" }else{ reExtObjVal = reExtObjVal+extObjVal[k]; } } extObjVal = reExtObjVal; } var extObjCss = transNull(extObj.attr("class")); if(extObjCss.indexOf("numlimit")>-1){ extObjVal = extObjVal.replace(/[^0-9]/g,""); } tempStr = tempStr + "$,$" + colList[j]+"$:$"+extObjVal; }else if(tempStr.indexOf(colList[j])==-1){ tempStr = tempStr + "$,$" + colList[j]+"$:$"+""; } }); } tempStr = tempStr.substr(3); var rtnObj = {}; var tempColList = tempStr.split("$,$"); for(var i=0; i"; }else if(extObjVal.charCodeAt(k)==13){ reExtObjVal = reExtObjVal+""; }else{ reExtObjVal = reExtObjVal+extObjVal[k]; } } extObjVal = reExtObjVal; rtnObj[colList[j]] = extObjVal; }else{ rtnObj[colList[j]] = ""; } } rtnList.push(rtnObj); } return rtnList; } function goodsJsonListObj(json, colList){ var rtnList = []; for(var i=0; i"; }else if(extObjVal.charCodeAt(k)==13){ reExtObjVal = reExtObjVal+""; }else{ reExtObjVal = reExtObjVal+extObjVal[k]; } } extObjVal = reExtObjVal; rtnObj[colList[j]] = extObjVal; }else{ rtnObj[colList[j]] = ""; } } rtnList.push(rtnObj); } return rtnList; } function cardJsonListObj(json, colList){ var rtnList = []; for(var i=0; i"; }else if(extObjVal.charCodeAt(k)==13){ reExtObjVal = reExtObjVal+""; }else{ reExtObjVal = reExtObjVal+extObjVal[k]; } } extObjVal = reExtObjVal; rtnObj[colList[j]] = extObjVal; }else{ rtnObj[colList[j]] = ""; } } rtnList.push(rtnObj); } return rtnList; } function makeHtmlTagListObj(tbId, colList){ var tempStr = ""; tbId = "#"+tbId; $(tbId).children("tbody").children("tr").each(function(i,e){ tempStr = tempStr + "$/$"; for(var j=0; j0){ var extObj = $(this).children("td").children("[name="+colList[j]+"]"); var extObjType = $(extObj)[0].type; if(extObjType=="input"){ extObjType = extObj.attr("type"); } var findStr = ""; if(extObjType=="radio") { findStr = "[name="+colList[j]+"]:checked"; }else{ findStr = "[name="+colList[j]+"]"; } var extObjVal = $(this).children("td").children(findStr).val(); if(extObjVal == "" || extObjVal == undefined) { extObjVal = ""; } if(extObjType=="textarea"){ reExtObjVal = ""; for(var k=0; k" }else{ reExtObjVal = reExtObjVal+extObjVal[k]; } } extObjVal = reExtObjVal; } var extObjCss = transNull(extObj.attr("class")); if(extObjCss.indexOf("numlimit")>-1){ extObjVal = extObjVal.replace(/[^0-9]/g,""); } tempStr = tempStr + "$,$" + colList[j]+"$:$"+extObjVal; }else{ tempStr = tempStr + "$,$" + colList[j]+"$:$"+""; } } }); tempStr = tempStr.substr(6); var rtnList = []; var tempRowList = tempStr.split("$/$"); var tempRowListCnt = tempRowList.length; if(tempStr == ""){ tempRowListCnt = 0; } for(var i=0; i < tempRowListCnt; i++){ var rtnObj = {}; var tempColList = tempRowList[i].split("$,$"); for(var j=0; j -1){ $(this).keyup(function(e){ inputLengthCheck(this, objLenList[idx]); }); } } }); } function inputLengthCheck(obj, len){ var inputText = $(obj).val(); var inputMaxLength = len; var j = 0; var count = 0; for(var i = 0; i < inputText.length; i++){ var val = escape(inputText.charAt(i)).length; if(val == 6) { j++; } j++; if(j <= inputMaxLength) { count++; } } if(j > inputMaxLength){ $(obj).val(inputText.substr(0, count)); } } //'-' 문자 제거 function remove_hyphen(arg){ var rtnVal = ''; return rtnVal = arg.replace(/\-/g, ""); } function is_bizno(val){ var as_Biz_no = val; var isNum = true; var I_TEMP_SUM = 0 ; var I_TEMP = 0; var S_TEMP; var I_CHK_DIGIT = 0; as_Biz_no = remove_hyphen(as_Biz_no); I_TEMP_SUM = I_TEMP_SUM + parseInt(as_Biz_no.substring(0,1),10) ; I_TEMP_SUM = I_TEMP_SUM + parseInt(as_Biz_no.substring(1,2),10) * 3 ; I_TEMP_SUM = I_TEMP_SUM + parseInt(as_Biz_no.substring(2,3),10) * 7 ; I_TEMP_SUM = I_TEMP_SUM + parseInt(as_Biz_no.substring(3,4),10) ; I_TEMP_SUM = I_TEMP_SUM + parseInt(as_Biz_no.substring(4,5),10) * 3 ; I_TEMP_SUM = I_TEMP_SUM + parseInt(as_Biz_no.substring(5,6),10) * 7 ; I_TEMP_SUM = I_TEMP_SUM + parseInt(as_Biz_no.substring(6,7),10) ; I_TEMP_SUM = I_TEMP_SUM + parseInt(as_Biz_no.substring(7,8),10) * 3 ; I_TEMP = parseInt(as_Biz_no.substring(8,9),10)*5,'00'; if (I_TEMP < 10){ S_TEMP = '0' + String(I_TEMP); }else{ S_TEMP = String(I_TEMP); } I_TEMP_SUM = I_TEMP_SUM + parseInt(S_TEMP.substring(0,1)) + parseInt(S_TEMP.substring(1,2)) ; I_CHK_DIGIT= (10-(I_TEMP_SUM%10))%10 ; if (as_Biz_no.substring(9,10) != String(I_CHK_DIGIT)){ return false; } return true; }