소스 정리

main
이범준 1 year ago
parent 864468eca2
commit d1e0cbc186

@ -269,7 +269,7 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
<!-- TODO : 미납만 조회 -->
</if>
<if test="taskSeCd == 'PVS'">
<if test="schExclTimeout == on">
<if test="schExclTimeout == 'on'">
AND OVTIME_YN = 'N'
</if>
</if>

@ -404,25 +404,8 @@ $(document).ready(function(){
var clsForTask = $("#taskSeCd--${pageName}").val().toLowerCase();
//업무별 입력 항목
var editSlotAreas = $("#frmEdit--${pageName}").find("[slot='edit']");
editSlotAreas.each(function(){
var tempHtml = "";
$(this).find("template").each(function(){
tempHtml += this.cloneNode(true).outerHTML;
});
var taskTemplate = $(this).find("template."+clsForTask);
if(taskTemplate.length < 1){
this.innerHTML = tempHtml;
return;
}
var inHtml = $(taskTemplate[0].content).find("slot")[0].innerHTML;
this.innerHTML = tempHtml + inHtml;
});
renderForTask('frmEdit--${pageName}', clsForTask);
initDatepicker("frmEdit--${pageName}"); //달력 초기화
$("#frmEdit--${pageName}").find(".form-date").each(function(){
@ -456,6 +439,4 @@ $(document).ready(function(){
$P.crdnControl.dataset.append({});
});
</script>

@ -302,23 +302,7 @@ $(document).ready(function(){
var clsForTask = taskSeCd.toLowerCase();
//업무별 조회조건
var searchSlotAreas = $("#frmSearch--${pageName}").find("[slot='search']");
searchSlotAreas.each(function(){
var tempHtml = "";
$(this).find("template").each(function(){
tempHtml += this.cloneNode(true).outerHTML;
});
var taskTemplate = $(this).find("template."+clsForTask);
if(taskTemplate.length < 1){
this.innerHTML = tempHtml;
return;
}
var inHtml = $(taskTemplate[0].content).find("slot")[0].innerHTML;
this.innerHTML = tempHtml + inHtml;
});
renderForTask("frmSearch--${pageName}", clsForTask);
//업무별 그리드
var colsContent = document.getElementById("crdnCols--${pageName}").content;

@ -437,42 +437,9 @@ $(document).ready(function(){
var clsForTask = taskSeCd.toLowerCase();
//업무별 조회조건
var searchSlotAreas = $("#frmSearch--${pageName}").find("[slot='search']");
searchSlotAreas.each(function(){
var tempHtml = "";
$(this).find("template").each(function(){
tempHtml += this.cloneNode(true).outerHTML;
});
var taskTemplate = $(this).find("template."+clsForTask);
if(taskTemplate.length < 1){
this.innerHTML = tempHtml;
return;
}
var inHtml = $(taskTemplate[0].content).find("slot")[0].innerHTML;
this.innerHTML = tempHtml + inHtml;
});
renderForTask("frmSearch--${pageName}", clsForTask);
//업무별 버튼
var buttonSlotAreas = $("#gridbuttonArea--${pageName}").find("[slot='button']");
buttonSlotAreas.each(function(){
var tempHtml = "";
$(this).find("template").each(function(){
tempHtml += this.cloneNode(true).outerHTML;
});
var taskTemplate = $(this).find("template."+clsForTask);
if(taskTemplate.length < 1){
this.innerHTML = tempHtml;
return;
}
var inHtml = $(taskTemplate[0].content).find("slot")[0].innerHTML;
this.innerHTML = tempHtml + inHtml;
});
renderForTask("gridbuttonArea--${pageName}", clsForTask);
$('#btnPhotoInspection--${pageName}').trigger("click");
}

@ -46,12 +46,14 @@
<script src="<c:url value="/resources/js/fims/framework/cmm/cmmUtil.js"/>?${ver}"></script>
<!-- 날짜 관련 유틸 -->
<script src="<c:url value="/resources/js/fims/framework/cmm/cmmDateUtil.js"/>?${ver}"></script>
<!-- 업무별 기능 유틸 -->
<script src="<c:url value="/resources/js/fims/framework/cmm/taskUtil.js"/>?${ver}"></script>
<!-- 데이트픽커 -->
<script src="<c:url value="/resources/lib/fims/framework/datepicker/datepicker.js?${ver}"/>"></script>
<script src="<c:url value="/resources/js/fims/framework/cmm/initDatepicker.js?${ver}"/>"></script>
<!-- 그리드 템플릿 설정 -->
<script src="<c:url value="/resources/js/fims/framework/cmm/initGrid.js"/>?${ver}"></script>
<!-- 검색 유틸 -->
<script src="<c:url value="/resources/js/fims/framework/cmm/searchUtil.js"/>?${ver}"></script>
<!-- endbuild -->

@ -247,3 +247,18 @@ function escapeHTMLEntity(str) {
return str;
}
}
/**
* 스네이크 표기법을 카멜 표기법으로 변경한다.
* @return 치환된 문자열
*/
function snakeToCamel(text){
text = text.toLowerCase();
var arrUnderbar = text.match(/\_[a-zA-Z]/g);
if(arrUnderbar){
for(var j = 0; j < arrUnderbar.length; j++) {
text = text.replace(arrUnderbar[j], arrUnderbar[j].toUpperCase().replace("_", ""));
}
}
return text;
}

@ -13,15 +13,3 @@ function searchFromGridTitle(byValue, byOutputValue, mainOption, subOption){
document.getElementById(mainOptionElementId).value = mainOption;
document.getElementById(subOptionElementId).value = subOption;
}
function snakeToCamel(text){
text = text.toLowerCase();
var arrUnderbar = text.match(/\_[a-zA-Z]/g);
if(arrUnderbar){
for(var j = 0; j < arrUnderbar.length; j++) {
text = text.replace(arrUnderbar[j], arrUnderbar[j].toUpperCase().replace("_", ""));
}
}
return text;
}

@ -0,0 +1,18 @@
function renderForTask(areaId, taskClass){
var slotAreas = $("#"+areaId).find("[slot]");
slotAreas.each(function(){
var tempHtml = "";
$(this).find("template").each(function(){
tempHtml += this.cloneNode(true).outerHTML;
});
var taskTemplate = $(this).find("template."+taskClass);
if(taskTemplate.length < 1){
this.innerHTML = tempHtml;
return;
}
var inHtml = $(taskTemplate[0].content).find("slot")[0].innerHTML;
this.innerHTML = tempHtml + inHtml;
});
}
Loading…
Cancel
Save