소스정리(주석 추가)

main
이범준 1 year ago
parent edd27a6f1b
commit bf4315f00d

@ -4,12 +4,14 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import cokr.xit.base.code.CommonCode; import cokr.xit.base.code.CommonCode;
import cokr.xit.base.web.ApplicationController; import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.crdn.service.Crdn05Service; import cokr.xit.fims.crdn.service.Crdn05Service;
/** .<br /> /** .<br />
@ -48,16 +50,45 @@ public class Crdn05Controller extends ApplicationController {
* @return fims/crdn/crdn05030-info * @return fims/crdn/crdn05030-info
*/ */
@RequestMapping(name="단속자료 수기 등록 화면", value="/030/info.do") @RequestMapping(name="단속자료 수기 등록 화면", value="/030/info.do")
public ModelAndView getManualRegistrationScreen() { public ModelAndView getManualRegistrationScreen(HttpServletRequest request) {
ModelAndView mav = new ModelAndView("fims/crdn/crdn05030-info"); ModelAndView mav = new ModelAndView("fims/crdn/crdn05030-info");
mav.addObject("pageName", "crdn05030-info");
String urlTaskSeCd = request.getServletPath().split("/")[1];
mav.addObject("taskSeCd", urlTaskSeCd);
Map<String, List<CommonCode>> commonCodes = getCodesOf("FIM011","FIM034","FIM053","LVS005"); Map<String, List<CommonCode>> commonCodes = getCodesOf("FIM011","FIM034","FIM053","LVS005");
mav.addObject("FIM011List", commonCodes.get("FIM011")); mav.addObject("FIM011List", commonCodes.get("FIM011"));
mav.addObject("FIM034List", commonCodes.get("FIM034")); mav.addObject("FIM034List", commonCodes.get("FIM034"));
mav.addObject("FIM053List", commonCodes.get("FIM053")); mav.addObject("FIM053List", commonCodes.get("FIM053"));
mav.addObject("LVS005List", commonCodes.get("LVS005")); mav.addObject("LVS005List", commonCodes.get("LVS005"));
switch(urlTaskSeCd) {
case "PVS" -> {}
case "BPV" -> {}
case "DPV" -> {
commonCodes = getCodesOf("FIM006");
mav.addObject("FIM006List", commonCodes.get("FIM006"));
}
case "ECA" -> {}
}
return mav; return mav;
} }
/** .
* @param Crdn
* @return jsonView
* <pre><code> {
* "saved": true, false
* }</code></pre>
*/
@RequestMapping(name="단속자료 수기 등록", value="/030/create.do")
public ModelAndView createCrdnDataByManual(Crdn crdn) {
boolean saved = false;
return new ModelAndView("jsonView")
.addObject("saved", saved);
}
} }

@ -1,16 +1,10 @@
package cokr.xit.fims.task; package cokr.xit.fims.task;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource; import javax.annotation.Resource;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import cokr.xit.base.code.CommonCode;
import cokr.xit.fims.crdn.Crdn; import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.crdn.CrdnQuery; import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.fims.crdn.service.Crdn06Service; import cokr.xit.fims.crdn.service.Crdn06Service;
@ -33,16 +27,7 @@ public class DpvController {
@Controller @Controller
@RequestMapping(name="장애인과태료업무 단속등록업무", value="/DPV/crdn/crdn05") @RequestMapping(name="장애인과태료업무 단속등록업무", value="/DPV/crdn/crdn05")
class DpvCrdn05Controller extends Crdn05Controller { class DpvCrdn05Controller extends Crdn05Controller {}
public ModelAndView getManualRegistrationScreen() {
ModelAndView mav = super.getManualRegistrationScreen();
Map<String, List<CommonCode>> commonCodes = getCodesOf("FIM006");
mav.addObject("FIM006List", commonCodes.get("FIM006"));
return mav;
}
}
@Controller @Controller
@RequestMapping(name="장애인과태료업무 단속업무", value="/DPV/crdn/crdn06") @RequestMapping(name="장애인과태료업무 단속업무", value="/DPV/crdn/crdn06")

@ -139,6 +139,9 @@ $(document).ready(function(){
var $P = pageObject["${pageName}"]; var $P = pageObject["${pageName}"];
/**************************************************************************
* DatasetControl
**************************************************************************/
$P.crdnControl = new DatasetControl({ $P.crdnControl = new DatasetControl({
prefix:"crdn", prefixName:"종합", infoSize:"xl", urls : { load : "", getInfo : "" }, prefix:"crdn", prefixName:"종합", infoSize:"xl", urls : { load : "", getInfo : "" },
keymapper:info => info ? info.CRDN_ID : "", dataGetter:obj => obj.crdnList, appendData:true, keymapper:info => info ? info.CRDN_ID : "", dataGetter:obj => obj.crdnList, appendData:true,
@ -150,6 +153,9 @@ $(document).ready(function(){
} }
}); });
/**************************************************************************
* DatasetControl.on
**************************************************************************/
$P.crdnControl.onDatasetChange = obj => { $P.crdnControl.onDatasetChange = obj => {
$P.renderCrdnList(); $P.renderCrdnList();
@ -169,10 +175,13 @@ $(document).ready(function(){
$P.crdnControl.onCurrentChange = item => { $P.crdnControl.onCurrentChange = item => {
if (!item) return; if (!item) return;
let key = item.data.CRDN_ID; var key = item.data.CRDN_ID;
$("#crdnTbody--${pageName}").setCurrentRow(key); $("#crdnTbody--${pageName}").setCurrentRow(key);
} }
/**************************************************************************
* pageObject.function
**************************************************************************/
$P.fnReset = () => { $P.fnReset = () => {
$('#schCvlcptRcptYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-5475).date); $('#schCvlcptRcptYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-5475).date);
$('#schCvlcptRcptYmdTo--${pageName}').datepicker('setDate', new Date()); $('#schCvlcptRcptYmdTo--${pageName}').datepicker('setDate', new Date());
@ -227,10 +236,11 @@ $(document).ready(function(){
return data; return data;
} }
//이벤트 추가 /**************************************************************************
* element.on
**************************************************************************/
$('#btnReset--${pageName}').on('click', () => $P.fnReset()); $('#btnReset--${pageName}').on('click', () => $P.fnReset());
$('#btnSearch--${pageName}').on('click', () => $P.searchCrdnList()); $('#btnSearch--${pageName}').on('click', () => $P.searchCrdnList());
$("#table-responsive--${pageName}").scroll(function(){ $("#table-responsive--${pageName}").scroll(function(){
var el = $(this); var el = $(this);
if(el.scrollTop() == 0){ if(el.scrollTop() == 0){
@ -242,6 +252,9 @@ $(document).ready(function(){
} }
}); });
/**************************************************************************
* 초기화
**************************************************************************/
//달력 초기화 //달력 초기화
initDatepicker("frmSearch--${pageName}"); initDatepicker("frmSearch--${pageName}");

@ -144,6 +144,9 @@ $(document).ready(function(){
var $P = pageObject["${pageName}"]; var $P = pageObject["${pageName}"];
/**************************************************************************
* DatasetControl
**************************************************************************/
$P.crdnControl = new DatasetControl({ $P.crdnControl = new DatasetControl({
prefix:"crdn", prefixName:"종합", infoSize:"xl", urls : { load : "", getInfo : "" }, prefix:"crdn", prefixName:"종합", infoSize:"xl", urls : { load : "", getInfo : "" },
keymapper:info => info ? info.CRDN_ID : "", dataGetter:obj => obj.crdnList, appendData:true, keymapper:info => info ? info.CRDN_ID : "", dataGetter:obj => obj.crdnList, appendData:true,
@ -156,6 +159,9 @@ $(document).ready(function(){
} }
}); });
/**************************************************************************
* DatasetControl.on
**************************************************************************/
$P.crdnControl.onDatasetChange = obj => { $P.crdnControl.onDatasetChange = obj => {
$P.renderCrdnList(); $P.renderCrdnList();
@ -175,10 +181,13 @@ $(document).ready(function(){
$P.crdnControl.onCurrentChange = item => { $P.crdnControl.onCurrentChange = item => {
if (!item) return; if (!item) return;
let key = item.data.CRDN_ID; var key = item.data.CRDN_ID;
$("#crdnTbody--${pageName}").setCurrentRow(key); $("#crdnTbody--${pageName}").setCurrentRow(key);
} }
/**************************************************************************
* pageObject.function
**************************************************************************/
$P.fnReset = () => { $P.fnReset = () => {
$('#schCvlcptRcptYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-5475).date); $('#schCvlcptRcptYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-5475).date);
$('#schCvlcptRcptYmdTo--${pageName}').datepicker('setDate', new Date()); $('#schCvlcptRcptYmdTo--${pageName}').datepicker('setDate', new Date());
@ -233,7 +242,9 @@ $(document).ready(function(){
return data; return data;
} }
//이벤트 추가 /**************************************************************************
* element.on
**************************************************************************/
$('#btnReset--${pageName}').on('click', () => $P.fnReset()); $('#btnReset--${pageName}').on('click', () => $P.fnReset());
$('#btnSearch--${pageName}').on('click', () => $P.searchCrdnList()); $('#btnSearch--${pageName}').on('click', () => $P.searchCrdnList());
@ -248,6 +259,9 @@ $(document).ready(function(){
} }
}); });
/**************************************************************************
* 초기화
**************************************************************************/
//달력 초기화 //달력 초기화
initDatepicker("frmSearch--${pageName}"); initDatepicker("frmSearch--${pageName}");

@ -9,7 +9,7 @@
<div class="container-page-btn"> <div class="container-page-btn">
<button type="button" class="btn btn-outline-dark" id="btnReset--${pageName}" title="초기화">초기화</button> <button type="button" class="btn btn-outline-dark" id="btnReset--${pageName}" title="초기화">초기화</button>
<span class="container-window-btn-right"> <span class="container-window-btn-right">
<button type="button" class="btn btn-search" id="btnSearch--${pageName}" title="검색">검색</button>
</span> </span>
</div> </div>
@ -40,6 +40,9 @@
<div> <div>
<span class="container-page-btn"> <span class="container-page-btn">
<div class="d-flex flex-row justify-content-between"> <div class="d-flex flex-row justify-content-between">
<label id="crdnPaging--${pageName}PagingInfo" class="dataTables_info" role="status" aria-live="polite"></label>
<ul id="crdnPaging--${pageName}" class="pagination pagination-primary">
</ul>
</div> </div>
<span class="container-window-btn-right"> <span class="container-window-btn-right">
<a href="#" class="btn btn-blue" id="btnInsertByFile--${pageName}" title="단속 파일 등록">단속 파일 등록</a> <a href="#" class="btn btn-blue" id="btnInsertByFile--${pageName}" title="단속 파일 등록">단속 파일 등록</a>
@ -47,6 +50,34 @@
</span> </span>
</span> </span>
</div> </div>
<div class="card-datatable text-nowrap">
<div id="DataTables_Table_0_wrapper--${pageName}" class="dataTables_wrapper dt-bootstrap5 no-footer">
<div id="table-responsive--${pageName}" class="table-responsive"
style="overflow-x: scroll;height:550px;overflow-y: scroll;">
<table id="DataTables_Table_0--${pageName}"
class="datatables-ajax table table-bordered dataTable no-footer">
<thead>
<tr id="crdnTheadTr--${pageName}">
<th width="80">No.</th>
<th width="80">temp</th>
</tr>
</thead>
<tbody id="crdnTbody--${pageName}"></tbody>
<template id="crdnRow--${pageName}">
<tr data-key="{CRDN_ID}">
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{ROW_NUM}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{temp}</td>
</tr>
</template>
<template id="crdnNotFound--${pageName}">
<tr>
<td valign="top" colspan="2" class="dataTables_empty text-center">단속 정보를 찾지 못했습니다.</td>
</tr>
</template>
</table>
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -57,7 +88,9 @@
<div class="content-backdrop fade"></div> <div class="content-backdrop fade"></div>
</div> </div>
<script> <script>
/**************************************************************************
* Global Variable
**************************************************************************/
pageObject["${pageName}"] = {}; pageObject["${pageName}"] = {};
@ -65,8 +98,11 @@ $(document).ready(function(){
var $P = pageObject["${pageName}"]; var $P = pageObject["${pageName}"];
/**************************************************************************
* DatasetControl
**************************************************************************/
$P.crdnControl = new DatasetControl({ $P.crdnControl = new DatasetControl({
prefix:"crdn", prefixName:"단속", infoSize:"xl", prefix:"crdn", prefixName:"단속", infoSize:"xxl",
urls : { load : "" }, urls : { load : "" },
keymapper:info => info ? info.CRDN_ID : "", keymapper:info => info ? info.CRDN_ID : "",
dataGetter:obj => obj.crdnList, dataGetter:obj => obj.crdnList,
@ -78,12 +114,6 @@ $(document).ready(function(){
$P.crdnControl.urls.newInfoByFile = ""; $P.crdnControl.urls.newInfoByFile = "";
$P.crdnControl.urls.newInfoByHand = ""; $P.crdnControl.urls.newInfoByHand = "";
$P.crdnControl.onDatasetChange = obj => {
};
$P.crdnControl.onCurrentChange = item => {
}
$P.crdnControl.newInfo = (type) => { $P.crdnControl.newInfo = (type) => {
var url = ""; var url = "";
if(type == "file") url = $P.crdnControl.urls.newInfoByFile; if(type == "file") url = $P.crdnControl.urls.newInfoByFile;
@ -113,31 +143,114 @@ $(document).ready(function(){
}); });
}; };
/**************************************************************************
* DatasetControl.on
**************************************************************************/
$P.crdnControl.onDatasetChange = obj => {
$P.renderCrdnList();
$("#crdnPaging--${pageName}").setPagingInfo({
list: $P.crdnControl.dataset,
prefix: "crdnPaging--${pageName}",
start: obj["crdnStart"],
totalSize: obj["crdnTotal"],
fetchSize: obj["crdnFetch"],
func: "pageObject['${pageName}'].crdnControl.load({index})"
});
};
$P.crdnControl.onCurrentChange = item => {
if (!item) return;
var key = item.data.CRDN_ID;
$("#crdnTbody--${pageName}").setCurrentRow(key);
}
/**************************************************************************
* pageObject.function
**************************************************************************/
$P.fnReset = () => { $P.fnReset = () => {
$("#regDt--${pageName}").datepicker('setDate', new Date()); $("#regDt--${pageName}").datepicker('setDate', new Date());
$P.crdnControl.setData([]);
} }
$P.fnResetAndChangeBiz = taskSeCd => { $P.searchCrdnList = () => {
$P.crdnControl.query = $P.getParams();
$P.crdnControl.load(1);
}
$P.scrollCrdnList = () => {
$P.crdnControl.load($P.crdnControl.query.pageNum + 1);
}
$P.clickCrdnList = (dataKey) => {
$P.crdnControl.setCurrent(dataKey);
$("#crdnTbody--${pageName}").setCurrentRow(dataKey);
}
$P.dblclickCrdnList = (dataKey) => {
$P.crdnControl.getInfo(dataKey);
}
$P.renderCrdnList = () => {
var crdnList = $P.crdnControl.dataset;
var empty = crdnList.empty;
var notFound = [document.getElementById("crdnNotFound--${pageName}").innerHTML];
var found = document.getElementById("crdnRow--${pageName}").innerHTML;
var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickCrdnList('" + dataItem.getValue("CRDN_ID") + "');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickCrdnList('" + dataItem.getValue("CRDN_ID") + "');");
var trs = empty ? notFound : crdnList.inStrings(found,replacer);
$("#crdnTbody--${pageName}").html(trs.join());
//보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked"));
}
$P.getParams = () => {
var formFields = new FimsFormFields("#frmSearch--${pageName}");
var data = formFields.get();
data.fetchSize = 30;
return data;
}
$P.fnResetAndChangeBiz = (taskSeCd) => {
$P.fnReset(); $P.fnReset();
$P.crdnControl.urls.newInfoByFile = wctx.url("/"+taskSeCd+"/crdn/crdn05/020/info.do"); $P.crdnControl.urls.newInfoByFile = wctx.url("/"+taskSeCd+"/crdn/crdn05/020/info.do");
$P.crdnControl.urls.newInfoByHand = wctx.url("/"+taskSeCd+"/crdn/crdn05/030/info.do"); $P.crdnControl.urls.newInfoByHand = wctx.url("/"+taskSeCd+"/crdn/crdn05/030/info.do");
} }
//달력 초기화 /**************************************************************************
initDatepicker("frmSearch--${pageName}"); * element.on
**************************************************************************/
var defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val();
$("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked",true);
$P.fnResetAndChangeBiz(defaultBizValue);
$('#btnReset--${pageName}').on('click', () => $P.fnReset()); $('#btnReset--${pageName}').on('click', () => $P.fnReset());
$("#btnInsertByFile--${pageName}").on('click', () => { $P.crdnControl.newInfo("file"); }); $("#btnInsertByFile--${pageName}").on('click', () => { $P.crdnControl.newInfo("file"); });
$("#btnInsertByHand--${pageName}").on('click', () => { $P.crdnControl.newInfo("hand"); }); $("#btnInsertByHand--${pageName}").on('click', () => { $P.crdnControl.newInfo("hand"); });
$("#table-responsive--${pageName}").scroll(function(){
var el = $(this);
if(el.scrollTop() == 0){
return;
}
if((el[0].scrollHeight - el.scrollTop() + VERTICAL_SCROLL_HEIGHT) == el.outerHeight()){
$P.scrollCrdnList();
}
});
/**************************************************************************
* 초기화
**************************************************************************/
initDatepicker("frmSearch--${pageName}"); //달력 초기화
var defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val();
$("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked",true);
$P.fnResetAndChangeBiz(defaultBizValue);
//보안모드 //보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked")); fn_securityModeToggle($("#securityMode--top").is(":checked"));
}); });
</script> </script>

@ -3,10 +3,10 @@
<div class="d-flex flex-row justify-content-evenly"> <div class="d-flex flex-row justify-content-evenly">
<div class="card" style="max-width:1100px;" title="단속정보"> <div class="card" style="max-width:1100px;" title="단속정보">
<form id="frm--${pageName}" class="dpv eca"> <form id="frm--${pageName}" class="dpv eca">
<input name="id" type="hidden" data-map="CRDN_ID" /> <input name="crdnId" type="hidden" data-map="CRDN_ID" />
<div class="row g-1"> <div class="row g-1">
<div class="col-md-4"> <div class="col-md-4">
<label class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end required" for="crdnYmd"> <label for="crdnYmd--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end required">
위반일자 위반일자
</label> </label>
<input type="text" id="crdnYmd--${pageName}" name="crdnYmd" data-map="CRDN_YMD" <input type="text" id="crdnYmd--${pageName}" name="crdnYmd" data-map="CRDN_YMD"
@ -14,22 +14,23 @@
<button type="button" class="bx bx-sm bx-calendar bg-white"></button> <button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<label class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end required" for="crdnHm"> <label for="crdnHm--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end required">
(숫자6자리)위반시간 (숫자6자리)위반시간
</label> </label>
<input type="text" name="crdnHm" data-map="CRDN_TM" class="form-control form-time" data-fmt-type="time" required /> <input type="text" id="crdnHm--${pageName}" name="crdnHm" data-map="CRDN_TM"
class="form-control form-time" data-fmt-type="time" required />
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<label class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end required" for="vhrno"> <label for="vhrno--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end required">
차량번호 차량번호
</label> </label>
<input type="text" name="vhrno" data-map="VHRNO" class="form-control" required /> <input type="text" id="vhrno--${pageName}" name="vhrno" data-map="VHRNO" class="form-control" required />
</div> </div>
<div class="col-md-12"> <div class="col-md-12">
<label class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end" for="vltnCd"> <label for="vltnCd--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">
위반내용 위반내용
</label> </label>
<select name="vltnCd" class="form-select" data-map="VLTN_CD"> <select id="vltnCd--${pageName}" name="vltnCd" class="form-select" data-map="VLTN_CD">
<c:forEach items="${FIM006List}" var="item"> <c:forEach items="${FIM006List}" var="item">
<option value="${item.code}">${item.value}</option> <option value="${item.code}">${item.value}</option>
</c:forEach> </c:forEach>
@ -42,29 +43,29 @@
(보류) (보류)
</div> </div>
<div class="col-md-6 select2-primary"> <div class="col-md-6 select2-primary">
<label class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end" for="crdnStdgNm">법정동</label> <label for="crdnStdgNm--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">법정동</label>
<input type="text" name="crdnStdgNm" data-map="CRDN_STDG_NM" class="form-control" readonly/> <input type="text" id="crdnStdgNm--${pageName}" name="crdnStdgNm" data-map="CRDN_STDG_NM" class="form-control" readonly/>
<button type="button" class="btn btn-sm btn-outline-dark" onclick="">검색</button> <button type="button" class="btn btn-sm btn-outline-dark" onclick="">검색</button>
</div> </div>
<div class="col-md-12"> <div class="col-md-12">
<label class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end" for="crdnPlc">위반장소</label> <label for="crdnPlc--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">위반장소</label>
<input type="text" name="crdnPlc" data-map="CRDN_PLC" class="form-control" /> <input type="text" id="crdnPlc--${pageName}" name="crdnPlc" data-map="CRDN_PLC" class="form-control" />
</div> </div>
<div class="col-md-12"> <div class="col-md-12">
<label class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end" for="crdnSn">발행번호</label> <label for="crdnSn--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">발행번호</label>
<input type="text" name="crdnSn" data-map="CRDN_SN" class="form-control" /> <input type="text" id="crdnSn--${pageName}" name="crdnSn" data-map="CRDN_SN" class="form-control" />
</div> </div>
<div class="col-md-12"> <div class="col-md-12">
<label class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end" for="towngYn">견인지시</label> <label for="towngYn--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">견인지시</label>
<select name="towngYn" class="form-select" data-map="TOWNG_YN"> <select id="towngYn--${pageName}" name="towngYn" class="form-select" data-map="TOWNG_YN">
<c:forEach items="${FIM053List}" var="item"> <c:forEach items="${FIM053List}" var="item">
<option value="${item.code}">${item.value}</option> <option value="${item.code}">${item.value}</option>
</c:forEach> </c:forEach>
</select> </select>
</div> </div>
<div class="col-md-12"> <div class="col-md-12">
<label class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end" for="parkngPsbltyRsltCd">장애차량확인</label> <label for="parkngPsbltyRsltCd--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">장애차량확인</label>
<select name="parkngPsbltyRsltCd" data-map="PARKNG_PSBLTY_RSLT_CD" class="form-select"> <select id="parkngPsbltyRsltCd--${pageName}" name="parkngPsbltyRsltCd" data-map="PARKNG_PSBLTY_RSLT_CD" class="form-select">
<c:forEach items="${FIM034List}" var="item"> <c:forEach items="${FIM034List}" var="item">
<c:if test="${item.code == '0' or item.code == '1'}"> <c:if test="${item.code == '0' or item.code == '1'}">
<option value="${item.code}">${item.value}</option> <option value="${item.code}">${item.value}</option>
@ -73,57 +74,57 @@
</select> </select>
</div> </div>
<div class="col-md-12"> <div class="col-md-12">
<label class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end" for="etcCn">특기사항</label> <label for="etcCn--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">특기사항</label>
<input type="text" name="etcCn" data-map="ETC_CN" class="form-control" /> <input type="text" id="etcCn--${pageName}" name="etcCn" data-map="ETC_CN" class="form-control" />
</div> </div>
<div class="col-md-12"> <div class="col-md-12">
<label class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end" for="rtpyrNm">소유자</label> <label for="rtpyrNm--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">소유자</label>
<input type="text" name="rtpyrNm" data-map="RTPYR_NM" class="form-control" /> <input type="text" id="rtpyrNm--${pageName}" name="rtpyrNm" data-map="RTPYR_NM" class="form-control" />
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<label class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end" for="rtpyrSeCd">주민번호구분</label> <label for="rtpyrSeCd--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">주민번호구분</label>
<select name="rtpyrSeCd" data-map="RTPYR_SE_CD" class="form-select"> <select id="rtpyrSeCd--${pageName}" name="rtpyrSeCd" data-map="RTPYR_SE_CD" class="form-select">
<c:forEach items="${FIM011List}" var="item"> <c:forEach items="${FIM011List}" var="item">
<option value="${item.code}">${item.value}</option> <option value="${item.code}">${item.value}</option>
</c:forEach> </c:forEach>
</select> </select>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<label class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end" for="rtpyrNo">주민번호</label> <label for="rtpyrNo--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">주민번호</label>
<input type="text" id="rtpyrNo--${pageName}" name="rtpyrNo" data-map="RTPYR_NO" class="form-control privacy" /> <input type="text" id="rtpyrNo--${pageName}" name="rtpyrNo" data-map="RTPYR_NO" class="form-control privacy" />
<input type="text" id="mask-rtpyrNo--${pageName}" class="form-control privacy-mask" disabled value="******"/> <input type="text" id="mask-rtpyrNo--${pageName}" class="form-control privacy-mask" disabled value="******"/>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<label class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end" for="vin">차대번호</label> <label for="vin--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">차대번호</label>
<input type="text" name="vin" data-map="VIN" class="form-control" readonly /> <input type="text" id="vin--${pageName}" name="vin" data-map="VIN" class="form-control" readonly />
</div> </div>
<div class="col-md-12"> <div class="col-md-12">
<label class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end" for="addr">주소</label> <label for="addr--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">주소</label>
<input type="text" name="addr" data-map="ADDR" class="form-control w-px-700" /> <input type="text" id="addr--${pageName}" name="addr" data-map="ADDR" class="form-control w-px-700" />
</div> </div>
<div class="col-md-12"> <div class="col-md-12">
<label class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end" for="dtlAddr">상세주소</label> <label for="dtlAddr--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">상세주소</label>
<input type="text" name="dtlAddr" data-map="DTL_ADDR" class="form-control w-px-700" /> <input type="text" id="dtlAddr--${pageName}" name="dtlAddr" data-map="DTL_ADDR" class="form-control w-px-700" />
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<label class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end" for="zip">우편번호</label> <label for="zip--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">우편번호</label>
<input type="text" name="zip" data-map="ZIP" class="form-control w-px-100" /> <input type="text" id="zip--${pageName}" name="zip" data-map="ZIP" class="form-control w-px-100" />
<button type="button" class="btn btn-sm btn-outline-dark" onclick="">검색</button> <button type="button" class="btn btn-sm btn-outline-dark" onclick="">검색</button>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
차량명칭/차량색상은 입력항목이 아닙니다. 차량명칭/차량색상은 입력항목이 아닙니다.
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<label class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end" for="vhclNm">차량명칭</label> <label for="vhclNm--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">차량명칭</label>
<input type="text" name="vhclNm" data-map="VHCL_NM" class="form-control" readonly /> <input type="text" id="vhclNm--${pageName}" name="vhclNm" data-map="VHCL_NM" class="form-control" readonly />
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<label class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end" for="vhclColor">차량색상</label> <label for="vhclColor--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">차량색상</label>
<input type="text" name="vhclColor" data-map="VHCL_COLOR" class="form-control" readonly /> <input type="text" id="vhclColor--${pageName}" name="vhclColor" data-map="VHCL_COLOR" class="form-control" readonly />
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<label class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end" for="useFuelCd">연료구분</label> <label for="useFuelCd--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">연료구분</label>
<select name="useFuelCd" data-map="USE_FUEL_CD" class="form-select" disabled> <select id="useFuelCd--${pageName}" name="useFuelCd" data-map="USE_FUEL_CD" class="form-select" disabled>
<c:forEach items="${LVS005List}" var="item"> <c:forEach items="${LVS005List}" var="item">
<option value=""></option> <option value=""></option>
<option value="${item.code}">${item.value}</option> <option value="${item.code}">${item.value}</option>
@ -131,8 +132,8 @@
</select> </select>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<label> <label for="doGuidance--${pageName}">
<input type="checkbox" name="doGuidance" class="form-check-input" />계도처리 <input type="checkbox" id="doGuidance--${pageName}" name="doGuidance" class="form-check-input" />계도처리
</label> </label>
</div> </div>
</div> </div>
@ -140,7 +141,7 @@
<div class="col-md-6"> <div class="col-md-6">
<div class="row justify-content-end"> <div class="row justify-content-end">
<div class="col-sm-3"> <div class="col-sm-3">
<button onclick="saveinfoPrefix();" type="button" class="btn btn-primary">등록</button> <button type="button" class="btn btn-primary" id="btnInst--${pageName}">등록</button>
</div> </div>
</div> </div>
</div> </div>
@ -153,14 +154,62 @@
</div> </div>
<script> <script>
/**************************************************************************
* Global Variable
**************************************************************************/
var formFields = new FimsFormFields("#frm--${pageName}");
pageObject["${pageName}"] = {};
$(document).ready(function(){ $(document).ready(function(){
var $P = pageObject["${pageName}"];
/**************************************************************************
* DatasetControl
**************************************************************************/
$P.crdnControl = new DatasetControl({
prefix:"crdn", prefixName:"단속", infoSize:"xxl",
urls : { load : "" },
keymapper:info => info ? info.CRDN_ID : "",
dataGetter:obj => obj.crdnList,
appendData:true,
formats: {
}
});
$P.crdnControl.urls.create = wctx.url("/${taskSeCd}/crdn/crdn05/030/create.do");
/**************************************************************************
* pageObject.function
**************************************************************************/
$P.fnSave = () => {
if (!$("#frm--${pageName} input").validInputs()) return;
dialog.alert({
content:"현재 단속 정보를 저장하시겠습니까?",
onOK:() => {
pageObject["crdn05030-info"].crdnControl.save(formFields.get());
}
});
};
/**************************************************************************
* element.on
**************************************************************************/
$("#btnInst--${pageName}").on('click', () => $P.fnSave());
/**************************************************************************
* 초기화
**************************************************************************/
//달력 초기화 //달력 초기화
initDatepicker("frm--${pageName}"); initDatepicker("frm--${pageName}");
//보안모드 //보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked")); fn_securityModeToggle($("#securityMode--top").is(":checked"));
$P.crdnControl.dataset.append({});
}); });

@ -296,6 +296,9 @@ $(document).ready(function(){
var $P = pageObject["${pageName}"]; var $P = pageObject["${pageName}"];
/**************************************************************************
* DatasetControl
**************************************************************************/
$P.crdnControl = new DatasetControl({ $P.crdnControl = new DatasetControl({
prefix:"crdn", prefix:"crdn",
prefixName:"종합", prefixName:"종합",
@ -325,6 +328,9 @@ $(document).ready(function(){
appendData:true appendData:true
}); });
/**************************************************************************
* DatasetControl.on
**************************************************************************/
$P.crdnControl.onDatasetChange = obj => { $P.crdnControl.onDatasetChange = obj => {
$P.renderCrdnList(); $P.renderCrdnList();
@ -344,10 +350,13 @@ $(document).ready(function(){
$P.crdnControl.onCurrentChange = item => { $P.crdnControl.onCurrentChange = item => {
if (!item) return; if (!item) return;
let key = item.data.CRDN_ID; var key = item.data.CRDN_ID;
$("#crdnTbody--${pageName}").setCurrentRow(key); $("#crdnTbody--${pageName}").setCurrentRow(key);
} }
/**************************************************************************
* pageObject.function
**************************************************************************/
$P.fnReset = () => { $P.fnReset = () => {
$('#schCrdnYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-5475).date); $('#schCrdnYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-5475).date);
$('#schCrdnYmdTo--${pageName}').datepicker('setDate', new Date()); $('#schCrdnYmdTo--${pageName}').datepicker('setDate', new Date());
@ -400,8 +409,7 @@ $(document).ready(function(){
var trs = empty ? notFound : crdnList.inStrings(found, replacer); var trs = empty ? notFound : crdnList.inStrings(found, replacer);
$("#crdnTbody--${pageName}").html(trs.join()); $("#crdnTbody--${pageName}").html(trs.join());
//보안모드 fn_securityModeToggle($("#securityMode--top").is(":checked")); //보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked"));
} }
$P.getParams = () => { $P.getParams = () => {
@ -412,15 +420,11 @@ $(document).ready(function(){
return data; return data;
} }
//달력 초기화 /**************************************************************************
initDatepicker("frmSearch--${pageName}"); * element.on
**************************************************************************/
$('#btnReset--${pageName}').on('click', () => $P.fnReset());
var defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val(); $('#btnSearch--${pageName}').on('click', () => $P.searchCrdnList());
$("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked",true);
$P.fnResetAndChangeBiz(defaultBizValue);
//스크롤 이벤트 추가
$("#table-responsive--${pageName}").scroll(function(){ $("#table-responsive--${pageName}").scroll(function(){
var el = $(this); var el = $(this);
if(el.scrollTop() == 0){ if(el.scrollTop() == 0){
@ -432,12 +436,16 @@ $(document).ready(function(){
} }
}); });
$('#btnReset--${pageName}').on('click', () => $P.fnReset()); /**************************************************************************
$('#btnSearch--${pageName}').on('click', () => $P.searchCrdnList()); * 초기화
**************************************************************************/
initDatepicker("frmSearch--${pageName}"); //달력 초기화
var defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val();
$("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked",true);
$P.fnResetAndChangeBiz(defaultBizValue);
//보안모드 fn_securityModeToggle($("#securityMode--top").is(":checked")); //보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked"));
}); });

@ -352,17 +352,9 @@ $(document).ready(function(){
var $P = pageObject["${pageName}"]; var $P = pageObject["${pageName}"];
//달력 초기화 /**************************************************************************
initDatepicker("frmSearch--${pageName}"); * DatasetControl
**************************************************************************/
$P.getParams = () => {
var formFields = new FimsFormFields("#frmSearch--${pageName}");
var data = formFields.get();
data.fetchSize = 30;
return data;
}
//단속사진검사 datasetControl 인스턴스 //단속사진검사 datasetControl 인스턴스
$P.photoInspectionControl = new DatasetControl({ $P.photoInspectionControl = new DatasetControl({
prefix:"photoInspection", prefixName:"종합", infoSize:"xl", urls : { load : "", getInfo : "" }, prefix:"photoInspection", prefixName:"종합", infoSize:"xl", urls : { load : "", getInfo : "" },
@ -377,19 +369,6 @@ $(document).ready(function(){
} }
}); });
$P.photoInspectionControl.onDatasetChange = obj => {
$P.renderInspectionDataList("photoInspection");
var prefix = obj.infoPrefix;
$("#photoInspectionPaging--${pageName}").setPagingInfo({
list: $P.photoInspectionControl.dataset,
prefix: "photoInspectionPaging--${pageName}",
start: obj[prefix+"Start"], totalSize: obj[prefix+"Total"], fetchSize: obj[prefix+"Fetch"],
func: "pageObject['${pageName}'].photoInspectionControl.load({index})"
});
};
//동일차량검사 datasetControl 인스턴스 //동일차량검사 datasetControl 인스턴스
$P.sameVehicleControl = new InspectionControl({ $P.sameVehicleControl = new InspectionControl({
prefix:"sameVehicleInspectionMain", prefixName:"종합", infoSize:"xl", urls : { load : "", getInfo : "" }, prefix:"sameVehicleInspectionMain", prefixName:"종합", infoSize:"xl", urls : { load : "", getInfo : "" },
@ -407,6 +386,22 @@ $(document).ready(function(){
} }
); );
/**************************************************************************
* DatasetControl.on
**************************************************************************/
$P.photoInspectionControl.onDatasetChange = obj => {
$P.renderInspectionDataList("photoInspection");
var prefix = obj.infoPrefix;
$("#photoInspectionPaging--${pageName}").setPagingInfo({
list: $P.photoInspectionControl.dataset,
prefix: "photoInspectionPaging--${pageName}",
start: obj[prefix+"Start"], totalSize: obj[prefix+"Total"], fetchSize: obj[prefix+"Fetch"],
func: "pageObject['${pageName}'].photoInspectionControl.load({index})"
});
};
$P.sameVehicleControl.main.onDatasetChange = obj => { $P.sameVehicleControl.main.onDatasetChange = obj => {
$P.renderInspectionDataList("sameVehicleInspectionMain"); $P.renderInspectionDataList("sameVehicleInspectionMain");
@ -425,6 +420,9 @@ $(document).ready(function(){
$P.renderInspectionDataList("sameVehicleInspectionSub"); $P.renderInspectionDataList("sameVehicleInspectionSub");
}; };
/**************************************************************************
* pageObject.function
**************************************************************************/
$P.fnReset = () => { $P.fnReset = () => {
$('#schCrdnYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-5475).date); $('#schCrdnYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-5475).date);
$('#schCrdnYmdTo--${pageName}').datepicker('setDate', new Date()); $('#schCrdnYmdTo--${pageName}').datepicker('setDate', new Date());
@ -433,7 +431,7 @@ $(document).ready(function(){
$P.sameVehicleControl.sub.setData([]); $P.sameVehicleControl.sub.setData([]);
}; };
$P.fnResetAndChangeBiz = taskSeCd => { $P.fnResetAndChangeBiz = (taskSeCd) => {
$P.fnReset(); $P.fnReset();
$P.photoInspectionControl.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn06/020/list.do?inspectionDataType=photo"); $P.photoInspectionControl.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn06/020/list.do?inspectionDataType=photo");
$P.photoInspectionControl.urls.getInfo = wctx.url("/"+taskSeCd+"/sprt/sprt01/020/info.do"); $P.photoInspectionControl.urls.getInfo = wctx.url("/"+taskSeCd+"/sprt/sprt01/020/info.do");
@ -552,28 +550,16 @@ $(document).ready(function(){
} }
$P.getParams = () => {
var formFields = new FimsFormFields("#frmSearch--${pageName}");
var data = formFields.get();
data.fetchSize = 30;
return data;
}
var defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val(); /**************************************************************************
$("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked",true); * element.on
$P.fnResetAndChangeBiz(defaultBizValue); **************************************************************************/
//스크롤 이벤트 추가(사진검사)
$("#photoInspection-responsive--${pageName}").scroll(function(){
var el = $(this);
if(el.scrollTop() == 0){ return; }
if((el[0].scrollHeight - el.scrollTop() + VERTICAL_SCROLL_HEIGHT) == el.outerHeight()){
$P.scrollInspectionDataList();
}
});
//스크롤 이벤트 추가(동일차량검사)
$("#sameVehicleInspectionMain-responsive--${pageName}").scroll(function(){
var el = $(this);
if(el.scrollTop() == 0){ return; }
if((el[0].scrollHeight - el.scrollTop() + VERTICAL_SCROLL_HEIGHT) == el.outerHeight()){
$P.scrollInspectionDataList();
}
});
$('#btnReset--${pageName}').on('click', () => $P.fnReset()); //초기화버튼 $('#btnReset--${pageName}').on('click', () => $P.fnReset()); //초기화버튼
$('#btnPhotoInspection--${pageName}').on('click', () => { $('#btnPhotoInspection--${pageName}').on('click', () => {
@ -595,6 +581,31 @@ $(document).ready(function(){
}); });
$('#btnSearch--${pageName}').on('click', () => $P.searchInspectionList()); //검색버튼 $('#btnSearch--${pageName}').on('click', () => $P.searchInspectionList()); //검색버튼
//스크롤 이벤트 추가(사진검사)
$("#photoInspection-responsive--${pageName}").scroll(function(){
var el = $(this);
if(el.scrollTop() == 0){ return; }
if((el[0].scrollHeight - el.scrollTop() + VERTICAL_SCROLL_HEIGHT) == el.outerHeight()){
$P.scrollInspectionDataList();
}
});
//스크롤 이벤트 추가(동일차량검사)
$("#sameVehicleInspectionMain-responsive--${pageName}").scroll(function(){
var el = $(this);
if(el.scrollTop() == 0){ return; }
if((el[0].scrollHeight - el.scrollTop() + VERTICAL_SCROLL_HEIGHT) == el.outerHeight()){
$P.scrollInspectionDataList();
}
});
/**************************************************************************
* 초기화
**************************************************************************/
initDatepicker("frmSearch--${pageName}"); //달력 초기화
var defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val();
$("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked",true);
$P.fnResetAndChangeBiz(defaultBizValue);
//보안모드 //보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked")); fn_securityModeToggle($("#securityMode--top").is(":checked"));

@ -119,6 +119,9 @@ $(document).ready(function(){
var $P = pageObject["${pageName}"]; var $P = pageObject["${pageName}"];
/**************************************************************************
* DatasetControl
**************************************************************************/
$P.crdnControl = new DatasetControl({ $P.crdnControl = new DatasetControl({
prefix:"crdn", prefixName:"종합", infoSize:"xl", prefix:"crdn", prefixName:"종합", infoSize:"xl",
urls : { urls : {
@ -135,6 +138,9 @@ $(document).ready(function(){
keymapper:info => info ? info.CRDN_ID : "", dataGetter:obj => obj.crdnList, appendData:true keymapper:info => info ? info.CRDN_ID : "", dataGetter:obj => obj.crdnList, appendData:true
}); });
/**************************************************************************
* DatasetControl.on
**************************************************************************/
$P.crdnControl.onDatasetChange = obj => { $P.crdnControl.onDatasetChange = obj => {
$P.renderCrdnList(); $P.renderCrdnList();
@ -149,13 +155,16 @@ $(document).ready(function(){
}); });
}; };
$P.crdnControl.onCurrentChange = item => { $P.crdnControl.onCurrentChange = (item) => {
if (!item) return; if (!item) return;
let key = item.data.CRDN_ID; var key = item.data.CRDN_ID;
$("#crdnTbody--${pageName}").setCurrentRow(key); $("#crdnTbody--${pageName}").setCurrentRow(key);
}; };
/**************************************************************************
* pageObject.function
**************************************************************************/
$P.searchCrdnList = () => { $P.searchCrdnList = () => {
$P.crdnControl.query = $P.getParams(); $P.crdnControl.query = $P.getParams();
$P.crdnControl.load(1); $P.crdnControl.load(1);
@ -208,11 +217,11 @@ $(document).ready(function(){
$P.crdnControl.setData([]); $P.crdnControl.setData([]);
} }
//달력 초기화 /**************************************************************************
initDatepicker("frmSearch--${pageName}"); * element.on
**************************************************************************/
$('#btnReset--${pageName}').on('click', () => $P.fnReset());
//스크롤 이벤트 추가 $('#btnSearch--${pageName}').on('click', () => $P.searchCrdnList());
$("#table-responsive--${pageName}").scroll(function(){ $("#table-responsive--${pageName}").scroll(function(){
var el = $(this); var el = $(this);
if(el.scrollTop() == 0){ if(el.scrollTop() == 0){
@ -222,10 +231,6 @@ $(document).ready(function(){
$P.scrollCrdnList(); $P.scrollCrdnList();
} }
}); });
$('#btnReset--${pageName}').on('click', () => $P.fnReset());
$('#btnSearch--${pageName}').on('click', () => $P.searchCrdnList());
$('#btnUpdateToConfirmData--${pageName}').on('click', () => { $('#btnUpdateToConfirmData--${pageName}').on('click', () => {
if(!$P.crdnControl.getCurrent()) { if(!$P.crdnControl.getCurrent()) {
@ -241,6 +246,12 @@ $(document).ready(function(){
}); });
}); });
/**************************************************************************
* 초기화
**************************************************************************/
//달력 초기화
initDatepicker("frmSearch--${pageName}");
$P.fnReset(); $P.fnReset();
//보안모드 //보안모드

@ -131,6 +131,9 @@ $(document).ready(function(){
var $P = pageObject["${pageName}"]; var $P = pageObject["${pageName}"];
/**************************************************************************
* DatasetControl
**************************************************************************/
$P.crdnControl = new DatasetControl({ $P.crdnControl = new DatasetControl({
prefix:"crdn", prefixName:"종합", infoSize:"xl", urls : { load : "", getInfo : "" }, prefix:"crdn", prefixName:"종합", infoSize:"xl", urls : { load : "", getInfo : "" },
formats: { formats: {
@ -143,6 +146,9 @@ $(document).ready(function(){
keymapper:info => info ? info.CRDN_ID : "", dataGetter:obj => obj.crdnList, appendData:true keymapper:info => info ? info.CRDN_ID : "", dataGetter:obj => obj.crdnList, appendData:true
}); });
/**************************************************************************
* DatasetControl.on
**************************************************************************/
$P.crdnControl.onDatasetChange = obj => { $P.crdnControl.onDatasetChange = obj => {
$P.renderCrdnList(); $P.renderCrdnList();
@ -161,10 +167,13 @@ $(document).ready(function(){
$P.crdnControl.onCurrentChange = item => { $P.crdnControl.onCurrentChange = item => {
if (!item) return; if (!item) return;
let key = item.data.CRDN_ID; var key = item.data.CRDN_ID;
$("#crdnTbody--${pageName}").setCurrentRow(key); $("#crdnTbody--${pageName}").setCurrentRow(key);
} }
/**************************************************************************
* pageObject.function
**************************************************************************/
$P.fnReset = () => { $P.fnReset = () => {
$('#schRductYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-5475).date); $('#schRductYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-5475).date);
$('#schRductYmdTo--${pageName}').datepicker('setDate', new Date()); $('#schRductYmdTo--${pageName}').datepicker('setDate', new Date());
@ -221,14 +230,11 @@ $(document).ready(function(){
} }
//달력 초기화 /**************************************************************************
initDatepicker("frmSearch--${pageName}"); * element.on
**************************************************************************/
var defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val(); $('#btnReset--${pageName}').on('click', () => $P.fnReset());
$("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked",true); $('#btnSearch--${pageName}').on('click', () => $P.searchCrdnList());
$P.fnResetAndChangeBiz(defaultBizValue);
//스크롤 이벤트 추가
$("#table-responsive--${pageName}").scroll(function(){ $("#table-responsive--${pageName}").scroll(function(){
var el = $(this); var el = $(this);
if(el.scrollTop() == 0){ if(el.scrollTop() == 0){
@ -239,8 +245,15 @@ $(document).ready(function(){
} }
}); });
$('#btnReset--${pageName}').on('click', () => $P.fnReset()); /**************************************************************************
$('#btnSearch--${pageName}').on('click', () => $P.searchCrdnList()); * 초기화
**************************************************************************/
//달력 초기화
initDatepicker("frmSearch--${pageName}");
var defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val();
$("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked",true);
$P.fnResetAndChangeBiz(defaultBizValue);
//보안모드 //보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked")); fn_securityModeToggle($("#securityMode--top").is(":checked"));

Loading…
Cancel
Save