단속 검색조건 jsp 수정.

main
jjh 5 months ago
parent e0d601a32b
commit e82e4caebe

@ -127,22 +127,30 @@ WHERE C.DEL_YN = 'N'
<if test="schCrdnYmdFrom != null">AND C.CRDN_YMD <![CDATA[ >= ]]> #{schCrdnYmdFrom} </if>
<if test="schCrdnYmdTo != null">AND C.CRDN_YMD <![CDATA[ <= ]]> #{schCrdnYmdTo} </if>
</if>
<if test="schDateFrom != null or schDateTo != null">
<if test="schDateOpt == 'regDt'">
<if test="schDateFrom != null">AND SUBSTR(C.REG_DT,1,8) <![CDATA[ >= ]]> #{schDateFrom} </if>
<if test="schDateTo != null">AND SUBSTR(C.REG_DT,1,8) <![CDATA[ <= ]]> #{schDateTo} </if>
</if>
<if test="schDateOpt == 'mdfcnDt'">
<if test="schDateFrom != null">AND SUBSTR(C.MDFCN_DT,1,8) <![CDATA[ >= ]]> #{schDateFrom} </if>
<if test="schDateTo != null">AND SUBSTR(C.MDFCN_DT,1,8) <![CDATA[ <= ]]> #{schDateTo} </if>
</if>
</if>
<if test="crdnSttsCd != null">
AND C.CRDN_STTS_CD = #{crdnSttsCd}
</if>
<if test="towngYn != null">
AND CA.TOWNG_YN = #{towngYn}
</if>
<if test="schRegDateFrom != null or schRegDateTo != null">
<if test="schRegDateOpt == 'regDt'">
<if test="schRegDateFrom != null"> AND C.REG_DT <![CDATA[>=]]> CONCAT(#{schRegDateFrom},'000000') </if>
<if test="schRegDateTo != null"> AND C.REG_DT <![CDATA[<=]]> CONCAT(#{schRegDateTo},'235959') </if>
</if>
<if test="schRegDateOpt == 'mdfcnDt'">
<if test="schRegDateFrom != null"> AND C.MDFCN_DT <![CDATA[ >= ]]> CONCAT(#{schRegDateFrom},'000000') </if>
<if test="schRegDateTo != null"> AND C.MDFCN_DT <![CDATA[ <= ]]> CONCAT(#{schRegDateTo},'235959') </if>
</if>
</if>
<if test="schRgtrCd != null">
<if test="schRgtrOpt == 'rgtr'">
<if test="schRgtrCd != null"> AND C.RGTR = #{schRgtrCd} </if>
</if>
<if test="schRgtrOpt == 'mdfr'">
<if test="schRgtrCd != null"> AND C.MDFR = #{schRgtrCd} </if>
</if>
</if>
<if test="by != null and by != '' and term != null">
<choose>
<when test="mainOption == 'codeValue' or mainOption == 'match' or mainOption == 'ymd'">
@ -241,6 +249,24 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
AND IFNULL(CA.OVTIME_PRTTN_YN,'N') = 'N'
</if>
</if>
<if test="schRegDateFrom != null or schRegDateTo != null">
<if test="schRegDateOpt == 'regDt'">
<if test="schRegDateFrom != null"> AND C.REG_DT <![CDATA[>=]]> CONCAT(#{schRegDateFrom},'000000') </if>
<if test="schRegDateTo != null"> AND C.REG_DT <![CDATA[<=]]> CONCAT(#{schRegDateTo},'235959') </if>
</if>
<if test="schRegDateOpt == 'mdfcnDt'">
<if test="schRegDateFrom != null"> AND C.MDFCN_DT <![CDATA[ >= ]]> CONCAT(#{schRegDateFrom},'000000') </if>
<if test="schRegDateTo != null"> AND C.MDFCN_DT <![CDATA[ <= ]]> CONCAT(#{schRegDateTo},'235959') </if>
</if>
</if>
<if test="schRgtrCd != null">
<if test="schRgtrOpt == 'rgtr'">
<if test="schRgtrCd != null"> AND C.RGTR = #{schRgtrCd} </if>
</if>
<if test="schRgtrOpt == 'mdfr'">
<if test="schRgtrCd != null"> AND C.MDFR = #{schRgtrCd} </if>
</if>
</if>
<if test="by != null and by != '' and term != null">
<choose>
<when test="mainOption == 'codeValue' or mainOption == 'match' or mainOption == 'ymd'">

@ -28,8 +28,8 @@
<form id="frmSearch--${pageName}" name="frmSearch">
<div class="container-search">
<div class="row g-1">
<div class="col-6">
<span class="form-label fw-bold form-search-title">업무구분</span>
<div class="col-12">
<span class="form-label fw-bold form-search-title w-px-120 text-end">업무구분</span>
<span class="form-search-linebox">
<c:forEach items="${TaskListForSgg}" var="item">
<label>
@ -42,7 +42,7 @@
</span>
</div>
<div class="col-6">
<span class="form-label fw-bold form-search-title">단속일자</span>
<label class="form-label fw-bold form-search-title w-px-120 text-end" for="schCrdnYmdFrom--${pageName}">단속일자</label>
<span class="form-search-linebox">
<input type="text" id="schCrdnYmdFrom--${pageName}" name="schCrdnYmdFrom"
class="form-control form-date"
@ -55,8 +55,8 @@
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</span>
</div>
<div class="col-4">
<label class="form-label fw-bold form-search-title" for="crdnInptSeCd--${pageName}">단속구분</label>
<div class="col-6">
<label class="form-label fw-bold form-search-title w-px-120 text-end" for="crdnInptSeCd--${pageName}">단속구분</label>
<select id="crdnInptSeCd--${pageName}" name="crdnInptSeCd" class="form-select">
<option value="">전체</option>
<c:forEach items="${FIM003List}" var="item">
@ -64,18 +64,18 @@
</c:forEach>
</select>
</div>
<div class="col-4">
<label class="form-label fw-bold form-search-title" for="vhrno--${pageName}">차량번호</label>
<div class="col-6">
<label class="form-label fw-bold form-search-title w-px-120 text-end" for="vhrno--${pageName}">차량번호</label>
<input type="text" id="vhrno--${pageName}" name="vhrno" class="form-control" />
</div>
<div class="col-4">
<div class="col-6">
<span class="area-samevehicleinspection">
<span class="form-label fw-bold form-search-title">단속건수</span>
<span class="form-label fw-bold form-search-title w-px-120 text-end">단속건수</span>
<input type="text" name="schCrdnCntFrom" class="form-control w-px-50" placeholder="2" />
~ <input type="text" name="schCrdnCntTo" class="form-control w-px-50"/>
</span>
</div>
<div class="col-12">
<div class="col-6">
<label>
<input type="checkbox" name="schExclEnd" class="form-check-input" />
서손자료제외
@ -98,27 +98,28 @@
</slot>
</template>
</span>
<span class="flr">
<button type="button" class="btn btn-open-detail"
data-bs-toggle="collapse" data-bs-target="#searchDetail--${pageName}">
<i class="bx bx-chevron-down"></i>
상세검색
</button>
</span>
</div>
<!-- 동적검색 -->
<div class="col-6">
<input type="hidden" id="by--${pageName}" name="by" />
<input type="text" class="form-control fw-bold w-px-120 text-end" id="byOutput--${pageName}" value="동적 검색" readonly />
<input type="hidden" id="mainOption--${pageName}" name="mainOption" />
<input type="hidden" id="subOption--${pageName}" name="subOption" />
<input type="text" class="form-control w-px-400" id="term--${pageName}" name="term" autocomplete="off" />
<!-- 상세 검색조건 버튼 -->
<span class="flr">
<button type="button" class="btn btn-open-detail" data-bs-toggle="collapse" data-bs-target="#searchDetail--${pageName}">
<i class="bx bx-chevron-down"></i>
상세검색
</button>
</span>
</div>
</div>
</div>
<div id="searchDetail--${pageName}" class="container-search container-search-detail collapse">
<div class="row">
<div class="col-6">
<input type="hidden" id="by--${pageName}" name="by" />
<input type="text" id="byOutput--${pageName}" class="form-control" readonly value="동적 검색" />
<input type="hidden" id="mainOption--${pageName}" name="mainOption" />
<input type="hidden" id="subOption--${pageName}" name="subOption" />
<input type="text" id="term--${pageName}" name="term" class="form-control" />
</div>
<div class="col-6">
<label class="form-label fw-bold form-search-title" for="crdnSttsCd--${pageName}">자료상태</label>
<div class="col-4">
<label class="form-label fw-bold form-search-title w-px-120 text-end" for="crdnSttsCd--${pageName}">자료상태</label>
<select id="crdnSttsCd--${pageName}" name="crdnSttsCd" class="form-select">
<option value="">전체</option>
<c:forEach items="${FIM010List}" var="item">
@ -126,23 +127,32 @@
</c:forEach>
</select>
</div>
<div class="col-6">
<select id="schDateOpt--${pageName}" name="schDateOpt" class="form-select">
<option value="regDt">등록일자</option>
<option value="mdfcnDt">수정일자</option>
</select>
<span class="form-search-linebox">
<input type="text" id="schDateFrom--${pageName}" name="schDateFrom"
class="form-control form-date"
data-fmt-type="day" title="시작 날짜 선택" />
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
<!-- 등록일자, 수정일자 -->
<div class="col-4">
<select class="form-select w-px-120 text-center" id="schRegDateOpt--${pageName}" name="schRegDateOpt">
<option value="regDt">등록일자</option>
<option value="mdfcnDt">수정일자</option>
</select>
<span class="form-search-linebox">
<input type="text" class="form-control form-date" id="schRegDateFrom--${pageName}" name="schRegDateFrom"
data-fmt-type="day" title="시작 날짜 선택" />
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
~
<input type="text" id="schDateTo--${pageName}" name="schDateTo"
class="form-control form-date"
<input type="text" class="form-control form-date" id="schRegDateTo--${pageName}" name="schRegDateTo"
data-fmt-type="day" title="종료 날짜 선택">
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</span>
</div>
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</span>
</div>
<!-- 등록자명, 수정자명 -->
<div class="col-4">
<select class="form-select w-px-120 text-center" id="schRgtrOpt--${pageName}" name="schRgtrOpt">
<option value="rgtr">등록자</option>
<option value="mdfr">수정자</option>
</select>
<input type="hidden" id="schRgtrCd--${pageName}" name="schRgtrCd" />
<input type="text" class="form-control w-px-160" id="schRgtrNm--${pageName}" name="schRgtrNm" />
<button type="button" class="btn btn-sm btn-outline-dark" id="btnFindUser--${pageName}" title="사용자 검색">검색</button>
</div>
</div>
</div>
</form>
@ -261,7 +271,7 @@
<div class="card-datatable text-nowrap d-inline-flex">
<div id="sameVehicleInspectionMain_Table_0_wrapper--${pageName}"
class="dataTables_wrapper dt-bootstrap5 no-footer">
<div id="sameVehicleInspectionMain-responsive--${pageName}"
<div id="sameVehicleInspectionMain-responsive--${pageName}"
class="table-responsive ox-scroll oy-scroll h-px-400 w-px-350">
<table id="sameVehicleInspectionMain_Table_0--${pageName}"
class="table-layout-fixed datatables-ajax table table-bordered dataTable no-footer">
@ -297,10 +307,10 @@
</div>
</div>
</div>
<div class="card-datatable text-nowrap d-inline-flex ms-3">
<div id="sameVehicleInspectionSub_Table_0_wrapper--${pageName}" class="dataTables_wrapper dt-bootstrap5 no-footer">
<div id="sameVehicleInspectionSub-responsive--${pageName}"
<div id="sameVehicleInspectionSub-responsive--${pageName}"
class="table-responsive ox-scroll oy-scroll h-px-400 w-px-1000">
<table id="sameVehicleInspectionSub_Table_0--${pageName}"
class="table-layout-fixed datatables-ajax table table-bordered dataTable no-footer">
@ -360,12 +370,9 @@
</div>
</div>
</span>
</div>
</div>
<div class="content-backdrop fade"></div>
</div>
@ -392,8 +399,8 @@ $(document).ready(function(){
$P.photoInspectionControl = new DatasetControl({
dataGetter : obj => obj["List"], appendData:true,
keymapper : info => info ? info.CRDN_ID : "",
urls : {
load : ""
urls : {
load : ""
},
formats: {
CRDN_YMD_TM : datetimeFormat,
@ -412,22 +419,22 @@ $(document).ready(function(){
$P.sameVehicleMainControl = new DatasetControl({
dataGetter : obj => obj["List"], appendData:true,
keymapper : info => info ? info.CRDN_ID_LIST : "",
urls : {
load : ""
urls : {
load : ""
},
formats: {
CRDN_CNT : numberFormat,
FFNLG_CRDN_AMT : numberFormat
formats: {
CRDN_CNT : numberFormat,
FFNLG_CRDN_AMT : numberFormat
}
});
$P.sameVehicleMainControl.defaultFetchSize = FETCH_XS;
$P.sameVehicleMainControl.untilPageNum = 0;
$P.sameVehicleMainControl.beforeCurrent = null;
$P.sameVehicleSubControl = new DatasetControl({
dataGetter : obj => obj["List"],
keymapper : info => info ? info.CRDN_ID : "",
urls : {
urls : {
load : ""
},
formats: {
@ -437,7 +444,7 @@ $(document).ready(function(){
FFNLG_CRDN_AMT : numberFormat
}
});
$P.photoInspectionControl.getNext = (key) => {
var ds = $P.photoInspectionControl.dataset.getDataset();
@ -457,7 +464,7 @@ $(document).ready(function(){
var t = $P.getGridTemplate("photoInspection");
var trs = Apply.fromDataset.getTbody($P.photoInspectionControl.dataset, t.found, t.notFound, t.replacer);
$P.renderInspectionDataList(obj["Total"], $P.photoInspectionControl.dataset.length, trs, "photoInspection");
Apply.fromDataset.paging($P.photoInspectionControl.dataset, obj, "photoInspectionPaging--${pageName}");
};
@ -475,7 +482,7 @@ $(document).ready(function(){
nextDataKey = nextData != null ? nextData.CRDN_ID : "";
nextDataVhrno = nextData != null ? nextData.VHRNO : "";
}
$P.showPhoto(dataKey,nextDataKey,curDataVhrno,nextDataVhrno);
}
@ -484,14 +491,14 @@ $(document).ready(function(){
var t = $P.getGridTemplate("sameVehicleInspectionMain");
var trs = Apply.fromDataset.getTbody($P.sameVehicleMainControl.dataset, t.found, t.notFound, t.replacer);
$P.renderInspectionDataList(obj["Total"], $P.sameVehicleMainControl.dataset.length, trs, "sameVehicleInspectionMain");
Apply.fromDataset.paging($P.sameVehicleMainControl.dataset, obj, "sameVehicleInspectionMainPaging--${pageName}");
};
$P.sameVehicleMainControl.dataset.onCurrentChange = (dataItem) => {
Apply.fromDataset.currentRow($P.sameVehicleMainControl.dataset, dataItem, $("#sameVehicleInspectionMainTbody--${pageName}")[0]);
if(dataItem){
$P.searchDetailInspectionDataList(dataItem.data["CRDN_ID_LIST"]);
$P.searchDetailInspectionDataList(dataItem.data["CRDN_ID_LIST"]);
} else {
$("#sameVehicleInspectionSubTbody--${pageName}").html("");
}
@ -519,12 +526,13 @@ $(document).ready(function(){
searchForm.find("select").each(function(){ $(this).find("option:eq(0)").prop("selected", true); });
$("#byOutput--${pageName}").val("동적 검색");
$("#schRgtrNm--${pageName}").prop("readonly", true); // 사용자 이름
$('#schCrdnYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-7).date);
$('#schCrdnYmdTo--${pageName}').datepicker('setDate', TODAY());
$P.photoInspectionControl.dataset.setData([]);
$P.sameVehicleMainControl.dataset.setData([]);
};
$P.fnResetAndChangeBiz = (taskSeCd) => {
$P.fnReset();
$P.photoInspectionControl.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn02/020/list.do");
@ -555,7 +563,7 @@ $(document).ready(function(){
return data;
}
$P.searchInspectionList = () => {
switch ($P.currentDisplay) {
case "photoInspection":
@ -571,7 +579,7 @@ $(document).ready(function(){
default: break;
}
}
$P.searchDetailInspectionDataList = (dataKey) => {
$P.sameVehicleSubControl.query = {};
$P.sameVehicleSubControl.query.inspectionDataType = "sameVehicleSub";
@ -591,7 +599,7 @@ $(document).ready(function(){
default: break;
}
}
$P.refreshInspectionList = () => {
switch ($P.currentDisplay) {
case "photoInspection":
@ -601,22 +609,22 @@ $(document).ready(function(){
key : $P.photoInspectionControl.dataset.getCurrent()["CRDN_ID"],
index : $P.photoInspectionControl.dataset.getCurrent()["ROW_NUM"] - 1
};
Apply.fromDatasetControl.load($P.photoInspectionControl, 1).then((resp)=>{
Apply.toDataset.set($P.photoInspectionControl.dataset, resp);
$P.photoInspectionControl.dataset.onDatasetChange(resp);
if($P.photoInspectionControl.untilPageNum != 0){
$P.photoInspectionControl.query.fetchSize = $P.photoInspectionControl.defaultFetchSize;
$P.photoInspectionControl.query.pageNum = $P.photoInspectionControl.untilPageNum;
$P.photoInspectionControl.untilPageNum = 0;
}
if($P.photoInspectionControl.beforeCurrent != null){
var beforeCurrentKey = $P.photoInspectionControl.beforeCurrent.key;
var beforeCurrentIndex = $P.photoInspectionControl.beforeCurrent.index;
$P.photoInspectionControl.beforeCurrent = null;
if(!$P.photoInspectionControl.dataset.empty){
var info = $P.photoInspectionControl.dataset.getData(beforeCurrentKey);
@ -630,9 +638,9 @@ $(document).ready(function(){
} else {
info = $P.photoInspectionControl.dataset.getDataset()[beforeCurrentIndex];
}
$P.photoInspectionControl.dataset.setCurrent(info["CRDN_ID"], true);
}
}
}
@ -645,17 +653,17 @@ $(document).ready(function(){
key : $P.sameVehicleMainControl.dataset.getCurrent()["CRDN_ID_LIST"],
index : $P.sameVehicleMainControl.dataset.getCurrent()["ROW_NUM"] - 1
};
Apply.fromDatasetControl.load($P.sameVehicleMainControl, 1).then((resp)=>{
Apply.toDataset.set($P.sameVehicleMainControl.dataset, resp);
$P.sameVehicleMainControl.dataset.onDatasetChange(resp);
if($P.sameVehicleMainControl.untilPageNum != 0){
$P.sameVehicleMainControl.query.fetchSize = $P.sameVehicleMainControl.defaultFetchSize;
$P.sameVehicleMainControl.query.pageNum = $P.sameVehicleMainControl.untilPageNum;
$P.sameVehicleMainControl.untilPageNum = 0;
}
if($P.sameVehicleMainControl.beforeCurrent != null){
var beforeCurrentKey = $P.sameVehicleMainControl.beforeCurrent.key;
var beforeCurrentIndex = $P.sameVehicleMainControl.beforeCurrent.index;
@ -679,14 +687,14 @@ $(document).ready(function(){
}
}
});
break;
default: break;
}
}
$P.fnExcelDown = async() => {
if($P.currentDisplay == "photoInspection"){
if($P.photoInspectionControl.dataset.empty){
@ -708,10 +716,10 @@ $(document).ready(function(){
alert("조회된 자료가 없습니다.");
return;
}
var excelTarget = await dialog2("저장할 자료를 선택하세요.","",
[{key:"main",value:"단속건수 엑셀저장"},{key:"sub",value:"상세내역 엑셀저장"},{key:"cancel",value:"취소"}]);
if(excelTarget == "main"){
var cellDefs = getCellDefs(
@ -735,14 +743,14 @@ $(document).ready(function(){
}
}
$P.getGridTemplate = (gridType) => {
var notFound;
var found;
var replacer;
switch (gridType) {
case "photoInspection":
case "photoInspection":
notFound = [document.getElementById("photoInspectionNotFound--${pageName}").innerHTML]
found = document.getElementById("photoInspectionRow--${pageName}").innerHTML;
replacer = (str, dataItem) => str
@ -750,30 +758,30 @@ $(document).ready(function(){
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickInspectionDataList('" + dataItem.getValue("CRDN_ID") + "','photoInspection');");
break;
case "sameVehicleInspectionMain":
case "sameVehicleInspectionMain":
notFound = [document.getElementById("sameVehicleInspectionMainNotFound--${pageName}").innerHTML];
found = document.getElementById("sameVehicleInspectionMainRow--${pageName}").innerHTML;
replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickInspectionDataList('" + dataItem.getValue("CRDN_ID_LIST") + "','sameVehicleInspectionMain');");
break;
case "sameVehicleInspectionSub":
case "sameVehicleInspectionSub":
notFound = [document.getElementById("sameVehicleInspectionSubNotFound--${pageName}").innerHTML]
found = document.getElementById("sameVehicleInspectionSubRow--${pageName}").innerHTML;
replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickInspectionDataList('" + dataItem.getValue("CRDN_ID") + "','sameVehicleInspectionSub');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickInspectionDataList('" + dataItem.getValue("CRDN_ID") + "','sameVehicleInspectionSub');");
break;
}
return {
found : found,
notFound : notFound,
replacer : replacer
};
}
$P.renderInspectionDataList = (total, listLength, trs, renderDataType) => {
switch (renderDataType) {
@ -802,9 +810,9 @@ $(document).ready(function(){
//보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked"));
}
$P.clickInspectionDataList = (dataKey, gridType) => {
switch (gridType) {
case "photoInspection":
@ -812,7 +820,7 @@ $(document).ready(function(){
$("#photoInspectionTbody--${pageName}").setCurrentRow(dataKey);
Apply.toDataset.current($P.photoInspectionControl.dataset, dataKey);
}
var curDataVhrno = $P.photoInspectionControl.dataset.getData(dataKey)["VHRNO"];
var nextData = $P.photoInspectionControl.getNext(dataKey);
var nextDataKey = nextData != null ? nextData.CRDN_ID : "";
@ -824,9 +832,9 @@ $(document).ready(function(){
return;
}
$("#sameVehicleInspectionMainTbody--${pageName}").setCurrentRow(dataKey);
Apply.toDataset.current($P.sameVehicleMainControl.dataset, dataKey);
$P.searchDetailInspectionDataList(dataKey);
break;
@ -835,7 +843,7 @@ $(document).ready(function(){
return;
}
$("#sameVehicleInspectionSubTbody--${pageName}").setCurrentRow(dataKey);
Apply.toDataset.current($P.sameVehicleSubControl.dataset, dataKey);
break;
}
@ -868,7 +876,7 @@ $(document).ready(function(){
}
$P.showPhoto = (dataKey, nextDataKey, curDataVhrno, nextDataVhrno) => {
if(dataKey == ""){
$("#curDataVhrno--${pageName}").html("");
$("#nextDataVhrno--${pageName}").html("");
@ -876,10 +884,10 @@ $(document).ready(function(){
$("#nextDataFiles--${pageName}").html("");
return;
}
$("#curDataVhrno--${pageName}").html(curDataVhrno);
$("#nextDataVhrno--${pageName}").html(nextDataVhrno);
ajax.get({
url:"file/list.do",
data: {
@ -909,7 +917,7 @@ $(document).ready(function(){
}
});
}
$P.openLevyExclPop = (levyExclSeCd) => {
var info = "";
@ -942,8 +950,8 @@ $(document).ready(function(){
if((typeof resp) != "string"){
dialog.alert({
content : resp.message,
init : function(){
focusClose();
init : function(){
focusClose();
}
});
return;
@ -988,8 +996,8 @@ $(document).ready(function(){
if((typeof resp) != "string"){
dialog.alert({
content : resp.message,
init : function(){
focusClose();
init : function(){
focusClose();
}
});
return;
@ -1011,12 +1019,39 @@ $(document).ready(function(){
if($("#levyExclDialog--${pageName}").length > 0){
dialog.close("levyExclDialog--${pageName}");
}
if(saved){
$P.refreshInspectionList();
}
}
// 사용자검색 callback
$P.callbackFindUser = (userId, userNm) => {
$("#schRgtrCd--${pageName}").val(userId); // 사용자 ID
$("#schRgtrNm--${pageName}").val(userNm); // 사용자 명
}
// 사용자검색 버튼 클릭 이벤트
$P.fnGetFindUser = () => {
let params = {
openerPageName: "${pageName}"
, callbackFuncName: "pageObject['${pageName}']['callbackFindUser']"
}
ajax.get({
url: wctx.url("/user/user02/010/main.do")
, data: params || {}
, success: resp => {
dialog.open({
id: "userDialog"
, title: "사용자 검색"
, content: resp
, size: "lg"
, init: () => { setDialogZindex(); }
});
}
});
}
/**************************************************************************
* element.on
@ -1043,12 +1078,11 @@ $(document).ready(function(){
$('#btnSearch--${pageName}').on('click', () => $P.searchInspectionList()); //검색버튼
// 동적검색에서 엔터(Enter) 키를 누르면 검색한다.
$("#term--${pageName}").onEnterPress($P.searchInspectionList);
$('#btnExcel--${pageName}').on('click', () => $P.fnExcelDown());
$('#btnExcel--${pageName}').on('click', () => $P.fnExcelDown());
$("#btnFindUser--${pageName}").on("click", () => $P.fnGetFindUser()); // 사용자 검색
$("#btnInstLevyExcl--${pageName}").on("click", () => $P.openLevyExclPop("1"));
fnMakeResizableTable($("#photoInspection-responsive--${pageName}")[0]);
fnMakeResizableTable($("#sameVehicleInspectionMain-responsive--${pageName}")[0]);
fnMakeResizableTable($("#sameVehicleInspectionSub-responsive--${pageName}")[0]);

@ -4,15 +4,15 @@
<div class="content-wrapper">
<div class="container-xxl flex-grow-1 px-0">
<div class="card wrapper-list">
<div class="container-page-btn">
<button type="button" id="btnReset--${pageName}" class="btn btn-outline-dark w-px-120" title="초기화">
초기화
</button>
<span class="container-window-btn-right">
<button type="button" id="btnSearch--${pageName}" class="btn btn-search w-px-120"
<button type="button" id="btnSearch--${pageName}" class="btn btn-search w-px-120"
title="검색">검색</button>
<button type="button" id="btnExcel--${pageName}" class="btn btn-excel w-px-120"
<button type="button" id="btnExcel--${pageName}" class="btn btn-excel w-px-120"
title="엑셀 저장">엑셀</button>
</span>
</div>
@ -20,39 +20,39 @@
<div class="container-search">
<div class="row g-1">
<div class="col-6">
<span class="form-label fw-bold form-search-title">단속일자</span>
<span class="form-label fw-bold form-search-title w-px-120 text-end">단속일자</span>
<span class="form-search-linebox">
<input type="text" id="schCrdnYmdFrom--${pageName}" name="schCrdnYmdFrom"
<input type="text" id="schCrdnYmdFrom--${pageName}" name="schCrdnYmdFrom"
class="form-control form-date"
data-fmt-type="day" title="시작 날짜 선택" />
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
~
<input type="text" id="schCrdnYmdTo--${pageName}" name="schCrdnYmdTo"
<input type="text" id="schCrdnYmdTo--${pageName}" name="schCrdnYmdTo"
class="form-control form-date"
data-fmt-type="day" title="종료 날짜 선택">
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</span>
</div>
<div class="col-6">
<div class="col-6">
<input type="hidden" id="by--${pageName}" name="by" />
<input type="text" id="byOutput--${pageName}" class="form-control" readonly value="동적 검색" />
<input type="text" class="form-control fw-bold w-px-120 text-end" id="byOutput--${pageName}" value="동적 검색" readonly />
<input type="hidden" id="mainOption--${pageName}" name="mainOption" />
<input type="hidden" id="subOption--${pageName}" name="subOption" />
<input type="text" id="term--${pageName}" name="term" class="form-control" />
</div>
<input type="text" class="form-control w-px-400" id="term--${pageName}" name="term" autocomplete="off" />
</div>
</div>
</div>
</form>
<div>
<span class="container-page-btn">
<div class="d-flex flex-row justify-content-between">
<span id="crdnPaging--${pageName}PagingInfo" class="dataTables_info"
<span id="crdnPaging--${pageName}PagingInfo" class="dataTables_info"
role="status" aria-live="polite"></span>
<ul id="crdnPaging--${pageName}" class="pagination pagination-primary">
</ul>
</div>
<span class="container-window-btn-right">
<button type="button" id="btnUpdateToConfirmData--${pageName}"
<button type="button" id="btnUpdateToConfirmData--${pageName}"
class="btn btn-primary" title="개별 확인 자료로 수정">개별 확인 자료로 수정</button>
</span>
</span>
@ -76,7 +76,7 @@
style="width: 200px;">차량번호</th>
<th onclick="searchFromGridTitle('CRDN_STDG_NM',this.innerText,'match','perfect');"
style="width: 200px;">법정동</th>
<th
<th
style="width: 200px;"
class="text-orange">잔액</th>
<th onclick="searchFromGridTitle('ATCH_FILE_CNT',this.innerText,'match','perfect');"
@ -114,8 +114,8 @@
</div>
</div>
</div>
<div class="content-backdrop fade"></div>
</div>
@ -162,11 +162,11 @@ $(document).ready(function(){
* Dataset.on
**************************************************************************/
$P.crdnControl.dataset.onDatasetChange = (obj) => {
var t = $P.getGridTemplate();
var trs = Apply.fromDataset.getTbody($P.crdnControl.dataset, t.found, t.notFound, t.replacer);
$P.renderCrdnList(obj["Total"], $P.crdnControl.dataset.length, trs);
Apply.fromDataset.paging($P.crdnControl.dataset, obj, "crdnPaging--${pageName}");
};
@ -190,7 +190,7 @@ $(document).ready(function(){
$('#schCrdnYmdTo--${pageName}').datepicker('setDate', TODAY());
$P.crdnControl.dataset.setData([]);
}
$P.getParams = () => {
var formFields = new FimsFormFields("#frmSearch--${pageName}");
var data = formFields.get();
@ -199,7 +199,7 @@ $(document).ready(function(){
return data;
}
$P.searchCrdnList = () => {
$P.crdnControl.query = $P.getParams();
$P.crdnControl.load(1);
@ -208,81 +208,81 @@ $(document).ready(function(){
$P.scrollCrdnList = () => {
$P.crdnControl.load($P.crdnControl.query.pageNum + 1);
}
$P.refreshCrdnList = () => {
$P.crdnControl.untilPageNum = $P.crdnControl.query.pageNum;
$P.crdnControl.query.fetchSize = $P.crdnControl.defaultFetchSize * $P.crdnControl.query.pageNum;
Apply.fromDatasetControl.load($P.crdnControl, 1).then((resp)=>{
Apply.toDataset.set($P.crdnControl.dataset, resp);
$P.crdnControl.dataset.onDatasetChange(resp);
if($P.crdnControl.untilPageNum != 0){
$P.crdnControl.query.fetchSize = $P.crdnControl.defaultFetchSize;
$P.crdnControl.query.pageNum = $P.crdnControl.untilPageNum;
$P.crdnControl.untilPageNum = 0;
}
if($P.crdnControl.beforeCurrent != null){
var beforeCurrentKey = $P.crdnControl.beforeCurrent.key;
var beforeCurrentIndex = $P.crdnControl.beforeCurrent.index;
$P.crdnControl.beforeCurrent = null;
if(!$P.crdnControl.dataset.empty){
var info = $P.crdnControl.dataset.getData(beforeCurrentKey);
if(info != null){
$P.crdnControl.dataset.setCurrent(beforeCurrentKey,true);
} else {
if(beforeCurrentIndex > ($P.crdnControl.dataset.length - 1)){
info = $P.crdnControl.dataset.getDataset()[$P.crdnControl.dataset.length - 1];
} else {
info = $P.crdnControl.dataset.getDataset()[beforeCurrentIndex];
}
$P.crdnControl.dataset.setCurrent(info["CRDN_ID"],true);
}
}
}
});
}
$P.fnExcelDown = () => {
if($P.crdnControl.dataset.empty){
alert("조회된 자료가 없습니다.");
return;
}
var cellDefs = getCellDefs($("#crdnTheadTr--${pageName} th").not(".dummy-th").not(":eq(0)"),
var cellDefs = getCellDefs($("#crdnTheadTr--${pageName} th").not(".dummy-th").not(":eq(0)"),
$($("#crdnRow--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)"));
$P.crdnControl.query.cellDefs = cellDefs;
$P.crdnControl.download();
}
$P.getGridTemplate = () => {
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") + "');");
return {
found : found,
notFound : notFound,
replacer : replacer
};
}
$P.renderCrdnList = (total, listLength, trs) => {
var noMore = (total == listLength);
var initScroll = ($P.crdnControl.query.pageNum < 2) && ($P.crdnControl.untilPageNum == 0);
$("#table-responsive--${pageName}")[0].changeContent(trs, initScroll, noMore);
//보안모드
@ -295,7 +295,7 @@ $(document).ready(function(){
$P.crdnControl.untilPageNum = 0;
}
}
$P.clickCrdnList = (dataKey) => {
if(dataKey == ""){
return;
@ -330,18 +330,18 @@ $(document).ready(function(){
$P.save = () => {
if(!$P.crdnControl.dataset.getCurrent()) {
dialog.alert({
dialog.alert({
content : "선택된 자료가 없습니다.",
init : function(){
focusClose();
init : function(){
focusClose();
}
});
return;
};
dialog.alert({
dialog.alert({
content : "현 자료를 장애차량 확인된 자료로 변경하시겠습니까?",
init : function(){
init : function(){
focusOK();
},
onOK : () => {
@ -350,13 +350,13 @@ $(document).ready(function(){
url : $P.crdnControl.urls.update,
data : info,
success : (resp) => {
$P.saveCallback(resp);
$P.saveCallback(resp);
}
});
}
});
}
$P.saveCallback = (resp) => {
if (resp.saved) {
dialog.alert({
@ -367,7 +367,7 @@ $(document).ready(function(){
});
}
}
/**************************************************************************
* element.on
**************************************************************************/
@ -376,10 +376,10 @@ $(document).ready(function(){
// 동적검색에서 엔터(Enter) 키를 누르면 검색한다.
$("#term--${pageName}").onEnterPress($P.searchCrdnList);
$('#btnExcel--${pageName}').on('click', () => $P.fnExcelDown());
fnMakeResizableTable($("#table-responsive--${pageName}")[0]);
fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollCrdnList);
$('#btnUpdateToConfirmData--${pageName}').on('click', () => $P.save());
/**************************************************************************
@ -392,7 +392,7 @@ $(document).ready(function(){
//보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked"));
});
</script>

@ -4,12 +4,12 @@
<div class="content-wrapper">
<div class="container-xxl flex-grow-1 px-0">
<div class="card wrapper-list">
<div class="container-page-btn">
<button type="button" id="btnReset--${pageName}"
<button type="button" id="btnReset--${pageName}"
class="btn btn-outline-dark w-px-120" title="초기화">초기화</button>
<span class="container-window-btn-right">
<button type="button" id="btnSearch--${pageName}"
<button type="button" id="btnSearch--${pageName}"
class="btn btn-search w-px-120" title="검색">검색</button>
</span>
</div>
@ -18,7 +18,7 @@
<div class="container-search">
<div class="row g-1">
<div class="col-6">
<span class="form-label fw-bold form-search-title">업무구분</span>
<span class="form-label fw-bold form-search-title w-px-120 text-end">업무구분</span>
<span class="form-search-linebox">
<c:forEach items="${TaskListForSgg}" var="item">
<label>
@ -31,8 +31,8 @@
</span>
</div>
<div class="col-6">
<label class="form-label fw-bold form-search-title" for="regDt--${pageName}">등록일자</label>
<input type="text" id="regDt--${pageName}" name="regDt"
<label class="form-label fw-bold form-search-title w-px-120 text-end" for="regDt--${pageName}">등록일자</label>
<input type="text" id="regDt--${pageName}" name="regDt"
class="form-control form-date" data-fmt-type="day"
title="금일" disabled="disabled" />
</div>
@ -42,22 +42,22 @@
<div>
<span class="container-page-btn">
<div class="d-flex flex-row justify-content-between">
<span id="crdnPaging--${pageName}PagingInfo" class="dataTables_info"
<span id="crdnPaging--${pageName}PagingInfo" class="dataTables_info"
role="status" aria-live="polite"></span>
<ul id="crdnPaging--${pageName}" class="pagination pagination-primary">
</ul>
</div>
<span class="container-window-btn-right">
<button type="button" id="btnInsertByFile--${pageName}" class="btn btn-primary"
<button type="button" id="btnInsertByFile--${pageName}" class="btn btn-primary"
title="단속 파일 등록">단속 파일 등록</button>
<button type="button" id="btnInsertByHand--${pageName}" class="btn btn-primary"
<button type="button" id="btnInsertByHand--${pageName}" class="btn btn-primary"
title="단속 수기 등록">단속 수기 등록</button>
</span>
</span>
</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}"
<div id="table-responsive--${pageName}"
class="table-responsive ox-scroll oy-scroll h-px-600">
<table id="DataTables_Table_0--${pageName}"
class="table-layout-fixed datatables-ajax table table-bordered dataTable no-footer">
@ -101,7 +101,7 @@
</div>
</div>
<div class="content-backdrop fade"></div>
</div>
@ -111,22 +111,22 @@
**************************************************************************/
var FIM003 = new CommonCodes(${FIM003});
var FIM026 = new CommonCodes(${FIM026});
pageObject["${pageName}"] = {};
$(document).ready(function(){
var $P = pageObject["${pageName}"];
/**************************************************************************
* DatasetControl
**************************************************************************/
$P.crdnControl = new DatasetControl({
dataGetter : obj => obj["List"], appendData:true,
keymapper : info => info ? info.CRDN_ID : "",
urls : {
load : ""
urls : {
load : ""
},
formats: {
CRDN_INPT_SE_CD : FIM003,
@ -137,7 +137,7 @@ $(document).ready(function(){
$P.crdnControl.defaultFetchSize = FETCH_XS;
$P.crdnControl.untilPageNum = 0;
$P.crdnControl.beforeCurrent = null;
$P.crdnControl.urls.newInfoByFile = "";
$P.crdnControl.urls.newInfoByHand = "";
@ -150,7 +150,7 @@ $(document).ready(function(){
$P.renderCrdnList(obj["Total"], $P.crdnControl.dataset.length, trs);
Apply.fromDataset.paging($P.crdnControl.dataset, obj, "crdnPaging--${pageName}");
};
$P.crdnControl.dataset.onCurrentChange = (dataItem) => {
@ -164,35 +164,35 @@ $(document).ready(function(){
$("#regDt--${pageName}").datepicker('setDate', TODAY());
$P.crdnControl.dataset.setData([]);
}
$P.fnResetAndChangeBiz = (taskSeCd) => {
$P.fnReset();
$P.crdnControl.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn05/010/list.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");
switch(taskSeCd){
case "PVS" :
case "PVS" :
case "BPV" :
case "DPV" :
case "DPV" :
case "ECA" :
case "DVS" :
$("#btnInsertByFile--${pageName}").show();
break;
case "PES" :
default :
default :
$("#btnInsertByFile--${pageName}").hide();
break;
}
}
$P.getParams = () => {
var formFields = new FimsFormFields("#frmSearch--${pageName}");
var data = formFields.get();
data.fetchSize = $P.crdnControl.defaultFetchSize;
return data;
}
$P.searchCrdnList = () => {
$P.crdnControl.query = $P.getParams();
$P.crdnControl.load(1);
@ -201,13 +201,13 @@ $(document).ready(function(){
$P.scrollCrdnList = () => {
$P.crdnControl.load($P.crdnControl.query.pageNum + 1);
}
$P.refreshCrdnList = () => {
$P.crdnControl.untilPageNum = $P.crdnControl.query.pageNum;
$P.crdnControl.query.fetchSize = $P.crdnControl.defaultFetchSize * $P.crdnControl.query.pageNum;
$P.crdnControl.load(1);
}
$P.getGridTemplate = () => {
var notFound = [document.getElementById("crdnNotFound--${pageName}").innerHTML];
@ -222,17 +222,17 @@ $(document).ready(function(){
replacer : replacer
};
}
$P.renderCrdnList = (total, listLength, trs) => {
var noMore = (total == listLength);
var initScroll = ($P.crdnControl.query.pageNum < 2) && ($P.crdnControl.untilPageNum == 0);
$("#table-responsive--${pageName}")[0].changeContent(trs, initScroll, noMore);
//보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked"));
if($P.crdnControl.untilPageNum != 0){
$P.crdnControl.query.fetchSize = $P.crdnControl.defaultFetchSize;
$P.crdnControl.query.pageNum = $P.crdnControl.untilPageNum;
@ -249,7 +249,7 @@ $(document).ready(function(){
$P.crdnControl.dataset.setCurrent(dataKey);
Apply.toDataset.current($P.crdnControl.dataset, dataKey);
}
$P.newInfo = (type) => {
var url = "";
if(type == "file") url = $P.crdnControl.urls.newInfoByFile;
@ -278,7 +278,7 @@ $(document).ready(function(){
}
});
};
/**************************************************************************
* element.on
**************************************************************************/
@ -286,10 +286,10 @@ $(document).ready(function(){
$("#btnSearch--${pageName}").on("click", () => $P.searchCrdnList());
$("#btnInsertByFile--${pageName}").on('click', () => { $P.newInfo("file"); });
$("#btnInsertByHand--${pageName}").on('click', () => { $P.newInfo("hand"); });
fnMakeResizableTable($("#table-responsive--${pageName}")[0]);
fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollCrdnList);
/**************************************************************************
* 초기화
**************************************************************************/
@ -300,7 +300,7 @@ $(document).ready(function(){
$P.fnResetAndChangeBiz(defaultBizValue);
//보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked"));
$("#frmSearch--${pageName} input[name='taskSeCd']").each(function(i) {
$(this).prop("disabled", "true");
});

@ -25,8 +25,8 @@
<form id="frmSearch--${pageName}" name="frmSearch">
<div class="container-search">
<div class="row g-1">
<div class="col-6">
<span class="form-label fw-bold form-search-title">업무구분</span>
<div class="col-12">
<span class="form-label fw-bold form-search-title w-px-120 text-end">업무구분</span>
<span class="form-search-linebox">
<c:forEach items="${TaskListForSgg}" var="item">
<label>
@ -39,21 +39,21 @@
</span>
</div>
<div class="col-6">
<span class="form-label fw-bold form-search-title">단속일자</span>
<label class="form-label fw-bold form-search-title w-px-120 text-end" for="schCrdnYmdFrom--${pageName}">단속일자</label>
<span class="form-search-linebox">
<input type="text" id="schCrdnYmdFrom--${pageName}" name="schCrdnYmdFrom"
<input type="text" id="schCrdnYmdFrom--${pageName}" name="schCrdnYmdFrom"
class="form-control form-date"
data-fmt-type="day" title="시작 날짜 선택" />
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
~
<input type="text" id="schCrdnYmdTo--${pageName}" name="schCrdnYmdTo"
<input type="text" id="schCrdnYmdTo--${pageName}" name="schCrdnYmdTo"
class="form-control form-date"
data-fmt-type="day" title="종료 날짜 선택">
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</span>
</div>
<div class="col-6">
<label class="form-label fw-bold form-search-title" for="crdnInptSeCd--${pageName}">자료출처</label>
<label class="form-label fw-bold form-search-title w-px-120 text-end" for="crdnInptSeCd--${pageName}">자료출처</label>
<select id="crdnInptSeCd--${pageName}" name="crdnInptSeCd" class="form-select">
<option value="">전체</option>
<c:forEach items="${FIM003List}" var="item">
@ -62,62 +62,31 @@
</select>
</div>
<div class="col-6">
<label class="form-label fw-bold form-search-title" for="vhrno--${pageName}">차량번호</label>
<label class="form-label fw-bold form-search-title w-px-120 text-end" for="vhrno--${pageName}">차량번호</label>
<input type="text" id="vhrno--${pageName}" name="vhrno" class="form-control" />
</div>
<div class="col-6">
<select id="schDateOpt--${pageName}" name="schDateOpt" class="form-select">
<option value="regDt">등록일자</option>
<option value="mdfcnDt">수정일자</option>
</select>
<span class="form-search-linebox">
<input type="text" id="schDateFrom--${pageName}" name="schDateFrom"
class="form-control form-date"
data-fmt-type="day" title="시작 날짜 선택" />
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
~
<input type="text" id="schDateTo--${pageName}" name="schDateTo"
class="form-control form-date"
data-fmt-type="day" title="종료 날짜 선택">
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</span>
</div>
<div class="col-6">
<input type="hidden" id="by--${pageName}" name="by" />
<input type="text" id="byOutput--${pageName}" class="form-control" readonly value="동적 검색" />
<div class="col-6">
<input type="hidden" id="by--${pageName}" name="by" />
<input type="text" class="form-control fw-bold w-px-120 text-end" id="byOutput--${pageName}" value="동적 검색" readonly />
<input type="hidden" id="mainOption--${pageName}" name="mainOption" />
<input type="hidden" id="subOption--${pageName}" name="subOption" />
<input type="text" id="term--${pageName}" name="term" class="form-control" />
<span class="flr">
<button type="button" class="btn btn-open-detail"
data-bs-toggle="collapse" data-bs-target="#searchDetail--${pageName}">
<i class="bx bx-chevron-down"></i>
상세검색
</button>
</span>
</div>
<input type="text" class="form-control w-px-400" id="term--${pageName}" name="term" autocomplete="off" />
<!-- 상세 검색조건 버튼 -->
<span class="flr">
<button type="button" class="btn btn-open-detail" data-bs-toggle="collapse" data-bs-target="#searchDetail--${pageName}">
<i class="bx bx-chevron-down"></i>
상세검색
</button>
</span>
</div>
</div>
</div>
<div id="searchDetail--${pageName}" class="container-search container-search-detail collapse">
<div class="row">
<div class="col-6">
<label class="form-label fw-bold form-search-title" for="crdnSttsCd--${pageName}">자료상태</label>
<select id="crdnSttsCd--${pageName}" name="crdnSttsCd" class="form-select">
<option value="">전체</option>
<c:forEach items="${FIM010List}" var="item">
<option value="${item.code}">${item.value}</option>
</c:forEach>
</select>
</div>
<div class="col-6">
</div>
</div>
<div class="row">
<div slot="search" class="col-6">
<div slot="search" class="col-6">
<template class="pvs dpv eca">
<slot>
<span class="form-label fw-bold form-search-title">견인</span>
<span class="form-label fw-bold form-search-title w-px-120 text-end">견인여부</span>
<label class="form-label">
<input type="radio" name="towngYn" value="" class="form-check-input" checked />전체
</label>
@ -130,6 +99,41 @@
</slot>
</template>
</div>
<div class="col-6">
<label class="form-label fw-bold form-search-title w-px-120 text-end" for="crdnSttsCd--${pageName}">자료상태</label>
<select id="crdnSttsCd--${pageName}" name="crdnSttsCd" class="form-select">
<option value="">전체</option>
<c:forEach items="${FIM010List}" var="item">
<option value="${item.code}">${item.value}</option>
</c:forEach>
</select>
</div>
<!-- 등록일자, 수정일자 -->
<div class="col-6">
<select class="form-select w-px-120 text-center" id="schRegDateOpt--${pageName}" name="schRegDateOpt">
<option value="regDt">등록일자</option>
<option value="mdfcnDt">수정일자</option>
</select>
<span class="form-search-linebox">
<input type="text" class="form-control form-date" id="schRegDateFrom--${pageName}" name="schRegDateFrom"
data-fmt-type="day" title="시작 날짜 선택" />
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
~
<input type="text" class="form-control form-date" id="schRegDateTo--${pageName}" name="schRegDateTo"
data-fmt-type="day" title="종료 날짜 선택">
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</span>
</div>
<!-- 등록자명, 수정자명 -->
<div class="col-6">
<select class="form-select w-px-120 text-center" id="schRgtrOpt--${pageName}" name="schRgtrOpt">
<option value="rgtr">등록자</option>
<option value="mdfr">수정자</option>
</select>
<input type="hidden" id="schRgtrCd--${pageName}" name="schRgtrCd" />
<input type="text" class="form-control w-px-160" id="schRgtrNm--${pageName}" name="schRgtrNm" />
<button type="button" class="btn btn-sm btn-outline-dark" id="btnFindUser--${pageName}" title="사용자 검색">검색</button>
</div>
</div>
</div>
</form>
@ -141,12 +145,12 @@
<ul id="crdnPaging--${pageName}" class="pagination pagination-primary">
</ul>
</div>
<span class="container-window-btn-right">
<span slot="button">
<template class="pvs bpv">
<slot>
<button type="button" class="btn btn-primary w-px-120"
<button type="button" class="btn btn-primary w-px-120"
id="btnSendCrdn--${pageName}" title="세외수입 전송">
&#x2611; 세외수입 전송
</button>
@ -205,7 +209,7 @@
<tr data-key="{CRDN_ID}">
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end cmn">{ROW_NUM}</td>
<td class="cmn text-center">
<input type="checkbox" class="form-check-input" name="gridCheckbox" value="{CRDN_ID}"
<input type="checkbox" class="form-check-input" name="gridCheckbox" value="{CRDN_ID}"
onchange="pageObject['${pageName}'].checkCrdnList(this, this.checked);">
</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center cmn">{CRDN_INPT_SE_CD}</td>
@ -258,17 +262,12 @@
</div>
</div>
</div>
</div>
</div>
<div class="content-backdrop fade"></div>
</div>
<script>
/**************************************************************************
@ -326,19 +325,19 @@ $(document).ready(function(){
var t = $P.getGridTemplate();
var trs = Apply.fromDataset.getTbody($P.crdnControl.dataset, t.found, t.notFound, t.replacer);
$P.renderCrdnList(obj["Total"], $P.crdnControl.dataset.length, trs);
Apply.fromDataset.paging($P.crdnControl.dataset, obj, "crdnPaging--${pageName}");
};
$P.crdnControl.dataset.onCurrentChange = (dataItem) => {
Apply.fromDataset.currentRow($P.crdnControl.dataset, dataItem, $("#crdnTbody--${pageName}")[0]);
}
$P.crdnControl.dataset.onSelectionChange = (selectedArr) => {
Apply.fromDataset.gridCheckbox($P.crdnControl.dataset, document.getElementById("crdnTbody--${pageName}"), 1, selectedArr);
Apply.fromDataset.gridButton($P.crdnControl.dataset, $("#btnSendCrdn--${pageName}")[0], selectedArr);
};
/**************************************************************************
* pageObject.function
**************************************************************************/
@ -351,11 +350,12 @@ $(document).ready(function(){
searchForm.find("select").each(function(){ $(this).find("option:eq(0)").prop("selected", true); });
$("#byOutput--${pageName}").val("동적 검색");
$("#schRgtrNm--${pageName}").prop("readonly", true); // 사용자 이름
$('#schCrdnYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-365).date);
$('#schCrdnYmdTo--${pageName}').datepicker('setDate', TODAY());
$P.crdnControl.dataset.setData([]);
}
$P.fnResetAndChangeBiz = (taskSeCd) => {
$P.fnReset();
$P.crdnControl.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn06/010/list.do");
@ -370,7 +370,7 @@ $(document).ready(function(){
//버튼 이벤트 재매핑
$("#btnSendCrdn--${pageName}").off("click");
$("#btnSendCrdn--${pageName}").on("click", () => $P.fnSendCrdn());
//업무별 그리드
var colsContent = document.getElementById("crdnCols--${pageName}").content;
var cols = $(colsContent).find("."+clsForTask+",.cmn");
@ -379,7 +379,7 @@ $(document).ready(function(){
colsStr += this.outerHTML;
});
$("#table-responsive--${pageName}")[0].changeColumn(colsStr);
if(SYS_LINK_INFO.NXRP_LINK_YN != 'Y'){
$("#btnSendCrdn--${pageName}").attr("hidden","hidden");
} else {
@ -394,7 +394,7 @@ $(document).ready(function(){
return data;
}
$P.searchCrdnList = () => {
$P.crdnControl.query = $P.getParams();
$P.crdnControl.load(1);
@ -409,34 +409,34 @@ $(document).ready(function(){
$P.crdnControl.query.fetchSize = $P.crdnControl.defaultFetchSize * $P.crdnControl.query.pageNum;
$P.crdnControl.load(1);
}
$P.fnExcelDown = (forApproval) => {
if($P.crdnControl.dataset.empty){
alert("조회된 자료가 없습니다.");
return;
}
var cellDefs = getCellDefs($("#crdnThead--${pageName} th").not(".dummy-th").not(":eq(0)").not(":eq(0)"),
var cellDefs = getCellDefs($("#crdnThead--${pageName} th").not(".dummy-th").not(":eq(0)").not(":eq(0)"),
$($("#crdnRow--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)").not(":eq(0)"));
$P.crdnControl.query.cellDefs = cellDefs;
if(forApproval){
$P.crdnControl.query.includePhoto = "Y";
} else {
$P.crdnControl.query.includePhoto = "N";
}
$P.crdnControl.download();
$P.crdnControl.query.includePhoto = null;
};
$P.checkCrdnList = (element, bool) => {
GRID.checkbox.sync(element, bool);
var atLeastOne = GRID.checkbox.countChecked(element) > 0;
$("#btnSendCrdn--${pageName}").prop("disabled", !atLeastOne);
Apply.toDataset.selection($P.crdnControl.dataset, element, bool);
}
@ -454,19 +454,19 @@ $(document).ready(function(){
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") + "');");
return {
found : found,
notFound : notFound,
replacer : replacer
};
}
$P.renderCrdnList = (total, listLength, trs) => {
var noMore = (total == listLength);
var initScroll = ($P.crdnControl.query.pageNum < 2) && ($P.crdnControl.untilPageNum == 0);
$("#table-responsive--${pageName}")[0].changeContent(trs, initScroll, noMore);
fn_securityModeToggle($("#securityMode--top").is(":checked")); //보안모드
@ -477,7 +477,7 @@ $(document).ready(function(){
$P.crdnControl.untilPageNum = 0;
}
}
$P.clickCrdnList = (dataKey) => {
if(dataKey == ""){
return;
@ -508,12 +508,12 @@ $(document).ready(function(){
});
}
$P.fnSendCrdn = () => {
var datas = $P.crdnControl.dataset.getDataset("selected");
var taskSeCd = datas[0].TASK_SE_CD;
var keys = $P.crdnControl.dataset.getKeys("selected");
var keys = $P.crdnControl.dataset.getKeys("selected");
var url = "";
if(taskSeCd == "PVS"){
url = "/"+taskSeCd+"/nxrp/nxrp01/010/createIndivB01.do";
@ -522,7 +522,7 @@ $(document).ready(function(){
} else {
return;
}
ajax.post({
url : wctx.url(url),
data : { "crdnIds" : keys.join(",") },
@ -530,9 +530,9 @@ $(document).ready(function(){
if(resp.saved){
dialog.alert({
content : "처리되었습니다.",
init : function() {
init : function() {
setDialogZindex();
focusClose();
focusClose();
},
onClose : function(){
$P.refreshCrdnList();
@ -544,8 +544,35 @@ $(document).ready(function(){
}
});
}
// 사용자검색 callback
$P.callbackFindUser = (userId, userNm) => {
$("#schRgtrCd--${pageName}").val(userId); // 사용자 ID
$("#schRgtrNm--${pageName}").val(userNm); // 사용자 명
}
// 사용자검색 버튼 클릭 이벤트
$P.fnGetFindUser = () => {
let params = {
openerPageName: "${pageName}"
, callbackFuncName: "pageObject['${pageName}']['callbackFindUser']"
}
ajax.get({
url: wctx.url("/user/user02/010/main.do")
, data: params || {}
, success: resp => {
dialog.open({
id: "userDialog"
, title: "사용자 검색"
, content: resp
, size: "lg"
, init: () => { setDialogZindex(); }
});
}
});
}
/**************************************************************************
* element.on
**************************************************************************/
@ -555,6 +582,7 @@ $(document).ready(function(){
$("#term--${pageName}").onEnterPress($P.searchCrdnList);
$('#btnExcel--${pageName}').on('click', () => $P.fnExcelDown(false));
$('#btnExcelForApproval--${pageName}').on('click', () => $P.fnExcelDown(true));
$("#btnFindUser--${pageName}").on("click", () => $P.fnGetFindUser()); // 사용자 검색
fnMakeResizableTable($("#table-responsive--${pageName}")[0]);
fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollCrdnList);

@ -20,7 +20,7 @@
<div class="container-search">
<div class="row g-1">
<div class="col-6">
<span class="form-label fw-bold form-search-title">업무구분</span>
<span class="form-label fw-bold form-search-title w-px-120 text-end">업무구분</span>
<span class="form-search-linebox">
<c:forEach items="${FIM054List}" var="item">
<c:if test="${item.code == 'PVS' or item.code == 'BPV'}">
@ -37,12 +37,12 @@
</div>
</div>
</form>
<!-- 리스트 -->
<div>
<span class="container-page-btn">
<div class="d-flex flex-row justify-content-between">
<span id="useTeamPaging--${pageName}PagingInfo" class="dataTables_info"
<span id="useTeamPaging--${pageName}PagingInfo" class="dataTables_info"
role="status" aria-live="polite"></span>
<ul id="useTeamPaging--${pageName}" class="pagination pagination-primary">
</ul>
@ -56,14 +56,14 @@
class="table-layout-fixed datatables-ajax table table-bordered dataTable no-footer">
<thead class="sticky-thead">
<tr id="useTeamTheadTr--${pageName}">
<th style="width: 200px;">단속조</th>
<th style="width: 200px;">단속구분</th>
<th style="width: 200px;">단속원1</th>
<th style="width: 200px;">단속원2</th>
<th style="width: 200px;">단속원3</th>
<th style="width: 200px;">단속원4</th>
<th style="width: 200px;">특이사항</th>
<th style="width: 200px;">등록일</th>
<th style="width: 160px;">단속조</th>
<th style="width: 160px;">단속구분</th>
<th style="width: 160px;">단속원1</th>
<th style="width: 160px;">단속원2</th>
<th style="width: 160px;">단속원3</th>
<th style="width: 160px;">단속원4</th>
<th style="width: 400px;">특이사항</th>
<th style="width: 180px;">등록일시</th>
<th class="dummy-th"></th>
</tr>
</thead>
@ -92,18 +92,18 @@
</div>
</div>
</div>
<!-- 입력, 수정 -->
<div class="card">
<form id="frmEdit--${pageName}">
<div class="row g-1">
<div class="col-md-3">
<label for="teamNm--${pageName}"
<label for="teamNm--${pageName}"
class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end required">
단속조명
</label>
<input type="text" id="teamNm--${pageName}" name="teamNm" class="form-control"
<input type="text" id="teamNm--${pageName}" name="teamNm" class="form-control"
data-maxlengthb="20" required />
</div>
<div class="col-md-9">
@ -121,28 +121,28 @@
<label for="teamer1--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">
단속원1
</label>
<input type="text" id="teamer1--${pageName}" name="teamer1" class="form-control"
<input type="text" id="teamer1--${pageName}" name="teamer1" class="form-control"
data-maxlengthb="20" />
</div>
<div class="col-md-3">
<label for="teamer2--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">
단속원2
</label>
<input type="text" id="teamer2--${pageName}" name="teamer2" class="form-control"
<input type="text" id="teamer2--${pageName}" name="teamer2" class="form-control"
data-maxlengthb="20" />
</div>
<div class="col-md-3">
<label for="teamer3--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">
단속원3
</label>
<input type="text" id="teamer3--${pageName}" name="teamer3" class="form-control"
<input type="text" id="teamer3--${pageName}" name="teamer3" class="form-control"
data-maxlengthb="20" />
</div>
<div class="col-md-3">
<label for="teamer4--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">
단속원4
</label>
<input type="text" id="teamer4--${pageName}" name="teamer4" class="form-control"
<input type="text" id="teamer4--${pageName}" name="teamer4" class="form-control"
data-maxlengthb="20" />
</div>
<div class="col-md-12">
@ -163,10 +163,10 @@
</div>
</div>
</div>
</form>
</div>
<!-- 비사용 리스트 -->
<div class="container-search">
<div class="row g-1">
@ -175,7 +175,7 @@
선택된 단속조
</label>
<span class="form-search-linebox">
<input type="text" id="deletedTeamNm--${pageName}" name="deletedTeamNm"
<input type="text" id="deletedTeamNm--${pageName}" name="deletedTeamNm"
class="form-control" />
<button type="button" id="btnShowDeleted--${pageName}" class="btn btn-search">
비사용 단속조 조회
@ -230,11 +230,11 @@
</div>
</div>
</div>
</div>
<div class="content-backdrop fade"></div>
</div>
@ -251,14 +251,14 @@ var FIM002 = new CommonCodes(${FIM002});
$(document).ready(function(){
var $P = pageObject["${pageName}"];
/**************************************************************************
* DatasetControl
**************************************************************************/
$P.useTeamControl = new DatasetControl({
dataGetter : obj => obj["List"], appendData:false,
keymapper : info => info ? info.TEAM_ID : "",
urls : {
urls : {
load : "",
remove : "",
save : ""
@ -284,27 +284,27 @@ $(document).ready(function(){
DEL_DT : datetimeFormat
}
});
/**************************************************************************
* Dataset.on
**************************************************************************/
$P.useTeamControl.dataset.onDatasetChange = (obj) => {
var t = $P.getGridTemplate("useTeam");
var trs = Apply.fromDataset.getTbody($P.useTeamControl.dataset, t.found, t.notFound, t.replacer);
$P.renderUseTeamList(obj["Total"], $P.useTeamControl.dataset.length, trs);
Apply.fromDataset.paging($P.useTeamControl.dataset, obj, "useTeamPaging--${pageName}");
};
$P.delTeamControl.dataset.onDatasetChange = (obj) => {
var t = $P.getGridTemplate("delTeam");
var trs = Apply.fromDataset.getTbody($P.delTeamControl.dataset, t.found, t.notFound, t.replacer);
$P.renderDelTeamList(obj["Total"], $P.delTeamControl.dataset.length, trs);
};
$P.useTeamControl.dataset.onCurrentChange = (dataItem) => {
if(!dataItem){
$("#teamNm--${pageName}").val("");
@ -316,9 +316,9 @@ $(document).ready(function(){
$("#etcCn--${pageName}").val("");
return;
}
Apply.fromDataset.currentRow($P.useTeamControl.dataset, dataItem, $("#useTeamTbody--${pageName}")[0]);
$("#teamNm--${pageName}").val(dataItem.data.TEAM_NM);
$("#crdnSeCd--${pageName}").val(dataItem.data.CRDN_SE_CD);
$("#teamer1--${pageName}").val(dataItem.data.TEAMER_1);
@ -326,63 +326,63 @@ $(document).ready(function(){
$("#teamer3--${pageName}").val(dataItem.data.TEAMER_3);
$("#teamer4--${pageName}").val(dataItem.data.TEAMER_4);
$("#etcCn--${pageName}").val(dataItem.data.ETC_CN);
$("#deletedTeamNm--${pageName}").val(dataItem.data.TEAM_NM);
}
/**************************************************************************
* pageObject.function
**************************************************************************/
$P.fnReset = () => {
var searchForm = $("#frmSearch--${pageName}");
searchForm.find("input[type='text']").val("");
searchForm.find("input[type='hidden']").val("");
$P.useTeamControl.dataset.setData([]);
var editForm = $("#frmEdit--${pageName}");
editForm.find("input[type='text']").val("");
editForm.find("input[type='hidden']").val("");
$P.delTeamControl.dataset.setData([]);
}
$P.fnResetAndChangeBiz = (taskSeCd) => {
$P.fnReset();
$P.useTeamControl.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn07/010/list.do");
$P.useTeamControl.urls.remove = wctx.url("/"+taskSeCd+"/crdn/crdn07/010/remove.do");
$P.useTeamControl.urls.save = wctx.url("/"+taskSeCd+"/crdn/crdn07/010/save.do");
}
$P.getParams = () => {
var formFields = new FimsFormFields("#frmSearch--${pageName}");
var data = formFields.get();
return data;
}
$P.searchUseTeamList = () => {
$P.useTeamControl.query = $P.getParams();
$P.useTeamControl.load(1);
}
$P.refreshUseTeamList = () => {
if($P.useTeamControl.query.pageNum == null){
$P.useTeamControl.query.pageNum = 1;
}
$P.useTeamControl.load(1);
}
$P.getGridTemplate = (gridType) => {
var found;
var notFound;
var replacer;
if(gridType == "useTeam"){
notFound = [document.getElementById("useTeamNotFound--${pageName}").innerHTML];
found = document.getElementById("useTeamRow--${pageName}").innerHTML;
@ -396,32 +396,32 @@ $(document).ready(function(){
.replace(/{onclick}/gi, "")
.replace(/{ondblclick}/gi, "");
}
return {
found : found,
notFound : notFound,
replacer : replacer
};
}
$P.renderUseTeamList = (total, listLength, trs) => {
$("#useTeamTbody--${pageName}").html(trs);
$("#useTeamTbody--${pageName}").html(trs);
}
$P.renderDelTeamList = (total, listLength, trs) => {
$("#delTeamTbody--${pageName}").html(trs);
}
$P.clickUseTeamList = (dataKey) => {
$P.useTeamControl.dataset.setCurrent(dataKey);
}
$P.fnSave = () => {
var formFields = new FimsFormFields("#frmEdit--${pageName}");
var data = formFields.get();
data.taskSeCd = $("#frmSearch--${pageName} input[name='taskSeCd']:checked").val();
ajax.get({
url : $P.useTeamControl.urls.save,
data : data,
@ -432,7 +432,7 @@ $(document).ready(function(){
}
});
}
$P.fnRemove = () => {
var dataKey = $P.useTeamControl.dataset.getCurrent()["TEAM_ID"];
ajax.get({
@ -447,41 +447,41 @@ $(document).ready(function(){
}
});
};
$P.fnShowDeleted = () => {
var teamNm = $("#deletedTeamNm--${pageName}").val();
var taskSeCd = $("#frmSearch--${pageName} input[name='taskSeCd']:checked").val();
ajax.get({
url : wctx.url("/" + taskSeCd + "/crdn/crdn07/010/removedTeamList.do"),
data: {
data: {
"teamNm" : teamNm,
"taskSeCd" : taskSeCd
},
success:(resp) => {
$P.delTeamControl.dataset.setData(resp);
}
});
}
/**************************************************************************
* element.on
**************************************************************************/
$('#btnReset--${pageName}').on('click', () => $P.fnReset());
$("#btnSearch--${pageName}").on("click", () => $P.searchUseTeamList());
$("#btnSave--${pageName}").on('click', () => { $P.fnSave(); });
$("#btnRemove--${pageName}").on('click', () => { $P.fnRemove(); });
$("#btnShowDeleted--${pageName}").on('click', () => { $P.fnShowDeleted(); });
fnMakeResizableTable($("#table-responsive_0--${pageName}")[0]);
fnMakeResizableTable($("#table-responsive_1--${pageName}")[0]);
/**************************************************************************
* 초기화
**************************************************************************/
@ -500,7 +500,7 @@ $(document).ready(function(){
$("#frmSearch--${pageName} input[name='taskSeCd']").eq(0).prop("checked",true);
}
}
$P.fnResetAndChangeBiz(defaultBizValue);
$("#frmSearch--${pageName} input[name='taskSeCd']").each(function(i) {

@ -22,13 +22,13 @@
<div class="container-search">
<div class="row g-1">
<div class="col-6">
<label class="form-label fw-bold form-search-title" for="vhrno--${pageName}">
<label class="form-label fw-bold form-search-title w-px-120 text-end" for="vhrno--${pageName}">
차량번호
</label>
<input type="text" id="vhrno--${pageName}" name="vhrno" class="form-control" />
</div>
<div class="col-6">
<label class="form-label fw-bold form-search-title" for="delYn--${pageName}">
<label class="form-label fw-bold form-search-title w-px-120 text-end" for="delYn--${pageName}">
삭제여부
</label>
<select id="delYn--${pageName}" name="denYn" class="form-select">
@ -43,17 +43,17 @@
<div>
<span class="container-page-btn">
<div class="d-flex flex-row justify-content-between">
<span id="exmptnVhclPaging--${pageName}PagingInfo" class="dataTables_info"
<span id="exmptnVhclPaging--${pageName}PagingInfo" class="dataTables_info"
role="status" aria-live="polite"></span>
<ul id="exmptnVhclPaging--${pageName}" class="pagination pagination-primary">
</ul>
</div>
<span class="container-window-btn-right">
<button type="button" id="btnCreate--${pageName}"
<button type="button" id="btnCreate--${pageName}"
class="btn btn-primary" title="면제차량 등록">면제차량 등록</button>
<button type="button" id="btnOpenDelRsn--${pageName}"
<button type="button" id="btnOpenDelRsn--${pageName}"
class="btn btn-primary" title="면제차량 삭제">면제차량 삭제</button>
<button type="button" id="btnHistory--${pageName}"
<button type="button" id="btnHistory--${pageName}"
class="btn btn-primary" title="면제차량 수정이력">면제차량 수정이력</button>
</span>
</span>
@ -113,12 +113,9 @@
</div>
</div>
</div>
</div>
</div>
<div class="content-backdrop fade"></div>
</div>
@ -148,20 +145,20 @@
/**************************************************************************
* Global Variable
**************************************************************************/
pageObject["${pageName}"] = {};
$(document).ready(function(){
var $P = pageObject["${pageName}"];
/**************************************************************************
* DatasetControl
**************************************************************************/
$P.exmptnVhclControl = new DatasetControl({
dataGetter : obj => obj["List"], appendData:true,
keymapper : info => info ? info.EXMPTN_VHCL_ID : "",
urls : {
urls : {
load : wctx.url("/BPV/crdn/crdn08/010/list.do"),
remove : wctx.url("/BPV/crdn/crdn08/010/remove.do"),
newInfo : wctx.url("/BPV/crdn/crdn08/020/info.do"),
@ -178,7 +175,7 @@ $(document).ready(function(){
$P.exmptnVhclControl.defaultFetchSize = FETCH_XS;
$P.exmptnVhclControl.untilPageNum = 0;
$P.exmptnVhclControl.beforeCurrent = null;
/**************************************************************************
* Dataset.on
**************************************************************************/
@ -193,7 +190,7 @@ $(document).ready(function(){
$P.exmptnVhclControl.dataset.onCurrentChange = (dataItem) => {
Apply.fromDataset.currentRow($P.exmptnVhclControl.dataset, dataItem, $("#exmptnVhclTbody--${pageName}")[0]);
}
/**************************************************************************
* pageObject.function
**************************************************************************/
@ -201,10 +198,10 @@ $(document).ready(function(){
var searchForm = $("#frmSearch--${pageName}");
searchForm.find("input[type='text']").val("");
searchForm.find("input[type='hidden']").val("");
$P.exmptnVhclControl.dataset.setData([]);
}
$P.getParams = () => {
var formFields = new FimsFormFields("#frmSearch--${pageName}");
var data = formFields.get();
@ -212,7 +209,7 @@ $(document).ready(function(){
data.fetchSize = $P.exmptnVhclControl.defaultFetchSize;
return data;
}
$P.searchExmptnVhclList = () => {
$P.exmptnVhclControl.query = $P.getParams();
$P.exmptnVhclControl.load(1);
@ -221,7 +218,7 @@ $(document).ready(function(){
$P.scrollExmptnVhclList = () => {
$P.exmptnVhclControl.load($P.exmptnVhclControl.query.pageNum + 1);
}
$P.refreshExmptnVhclList = () => {
if($P.exmptnVhclControl.query.pageNum == null){
$P.exmptnVhclControl.query.pageNum = 1;
@ -230,20 +227,20 @@ $(document).ready(function(){
$P.exmptnVhclControl.query.fetchSize = $P.exmptnVhclControl.defaultFetchSize * $P.exmptnVhclControl.query.pageNum;
$P.exmptnVhclControl.load(1);
}
$P.fnExcelDown = () => {
if($P.exmptnVhclControl.dataset.empty){
alert("조회된 자료가 없습니다.");
return;
}
var cellDefs = getCellDefs($("#exmptnVhclTheadTr--${pageName} th").not(".dummy-th").not(":eq(0)"),
var cellDefs = getCellDefs($("#exmptnVhclTheadTr--${pageName} th").not(".dummy-th").not(":eq(0)"),
$($("#exmptnVhclRow--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)"));
$P.exmptnVhclControl.query.cellDefs = cellDefs;
$P.exmptnVhclControl.download();
}
$P.getGridTemplate = () => {
var notFound = [document.getElementById("exmptnVhclNotFound--${pageName}").innerHTML];
var found = document.getElementById("exmptnVhclRow--${pageName}").innerHTML;
@ -257,17 +254,17 @@ $(document).ready(function(){
replacer : replacer
};
}
$P.renderExmptnVhclList = (total, listLength, trs) => {
var noMore = (total == listLength);
var initScroll = ($P.exmptnVhclControl.query.pageNum < 2) && ($P.exmptnVhclControl.untilPageNum == 0);
$("#table-responsive--${pageName}")[0].changeContent(trs, initScroll, noMore);
//보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked"));
if($P.exmptnVhclControl.untilPageNum != 0){
$P.exmptnVhclControl.query.fetchSize = $P.exmptnVhclControl.defaultFetchSize;
$P.exmptnVhclControl.query.pageNum = $P.exmptnVhclControl.untilPageNum;
@ -281,19 +278,19 @@ $(document).ready(function(){
$("#btnHistory--${pageName}").prop("disabled", true);
return;
}
if($P.exmptnVhclControl.dataset.getData(dataKey)["DEL_YN"] == "N"){
$("#btnOpenDelRsn--${pageName}").prop("disabled", false);
} else {
$("#btnOpenDelRsn--${pageName}").prop("disabled", true);
}
$("#btnHistory--${pageName}").prop("disabled", false);
$("#exmptnVhclTbody--${pageName}").setCurrentRow(dataKey);
Apply.toDataset.current($P.exmptnVhclControl.dataset, dataKey);
}
$P.dblclickExmptnVhclList = (dataKey) => {
if(dataKey == ""){
return;
@ -302,8 +299,8 @@ $(document).ready(function(){
if(data.DEL_YN == "Y"){
dialog.alert({
content : "삭제된 자료입니다.",
init : function() {
focusClose();
init : function() {
focusClose();
}
});
return;
@ -339,7 +336,7 @@ $(document).ready(function(){
}
});
};
$P.newInfo = () => {
ajax.get({
url : $P.exmptnVhclControl.urls.newInfo,
@ -368,7 +365,7 @@ $(document).ready(function(){
}
});
};
$P.fnOpenDelRsnDialog = () => {
dialog.open({
id : "delRsnDialog--${pageName}",
@ -381,14 +378,14 @@ $(document).ready(function(){
},
onClose : () => {}
});
}
$P.fnRemove = () => {
var dataKey = $P.exmptnVhclControl.dataset.getCurrent()["EXMPTN_VHCL_ID"];
ajax.get({
url : $P.exmptnVhclControl.urls.remove,
data : {
data : {
"exmptnVhclId" : dataKey,
"delRsn" : $("#delRsn--${pageName}").val()
},
@ -400,10 +397,10 @@ $(document).ready(function(){
}
});
};
$P.fnOpenHistory = () => {
var dataKey = $P.exmptnVhclControl.dataset.getCurrent()["EXMPTN_VHCL_ID"];
ajax.get({
url : wctx.url("/BPV/crdn/crdn08/030/list.do"),
data: { "exmptnVhclId" : dataKey },
@ -414,34 +411,34 @@ $(document).ready(function(){
content : resp,
size: "xxl",
init:() => {
}
});
}
});
}
$P.provide = {
"refreshList" : function(){
$P.refreshExmptnVhclList();
}
}
/**************************************************************************
* element.on
**************************************************************************/
$('#btnReset--${pageName}').on('click', () => $P.fnReset());
$("#btnSearch--${pageName}").on("click", () => $P.searchExmptnVhclList());
$('#btnExcel--${pageName}').on('click', () => $P.fnExcelDown());
$("#btnCreate--${pageName}").on('click', () => { $P.newInfo(); });
$("#btnOpenDelRsn--${pageName}").on('click', () => { $P.fnOpenDelRsnDialog(); });
$("#btnHistory--${pageName}").on('click', () => { $P.fnOpenHistory(); });
fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollExmptnVhclList);
fnMakeResizableTable($("#table-responsive--${pageName}")[0]);
/**************************************************************************
* 초기화
**************************************************************************/

Loading…
Cancel
Save