|
|
|
@ -59,41 +59,107 @@
|
|
|
|
|
</c:forEach>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
<input type="text" id="countStauts--${pageName}" class="form-control w-px-150 text-center fw-bold" readonly />
|
|
|
|
|
<button type="button" class="w-px-50" id="btnPrev--${pageName}">◀</button>
|
|
|
|
|
<button type="button" class="w-px-50" id="btnNext--${pageName}">▶</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<script>
|
|
|
|
|
pageObject["${pageName}"] = {};
|
|
|
|
|
pageObject["${pageName}"].parentRes = {};
|
|
|
|
|
|
|
|
|
|
pageObject.childReq = [];
|
|
|
|
|
pageObject.childReq.push({
|
|
|
|
|
getCountStatus : function(){},
|
|
|
|
|
getNextKey : function(){},
|
|
|
|
|
getPrevKey : function(){},
|
|
|
|
|
selectRow : function(){}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
|
|
|
|
|
var $P = pageObject["${pageName}"];
|
|
|
|
|
$P.taskSeCd = "${taskSeCd}";
|
|
|
|
|
|
|
|
|
|
if(pageObject.parentRes.length > 0){
|
|
|
|
|
$P.parentRes = pageObject.parentRes.pop();
|
|
|
|
|
} else {
|
|
|
|
|
$P.parentRes = pageObject.childReq.pop();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* DatasetControl, Dataset, FormFields
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$P.formFields = new FimsFormFields("#frmEdit--${pageName}");
|
|
|
|
|
|
|
|
|
|
$P.cvlcptControl = new DatasetControl({
|
|
|
|
|
$P.cvlcptControl = new DatasetControl({
|
|
|
|
|
prefix:"cvlcpt", prefixName:"민원", infoSize:"xl",
|
|
|
|
|
urls : { load : "" },
|
|
|
|
|
urls : { load : "", getInfo : wctx.url("/"+$P.taskSeCd+"/crdn/crdn01/050/info.do") },
|
|
|
|
|
keymapper:info => info ? info.CRDN_ID : "",
|
|
|
|
|
dataGetter:obj => obj.cvlcptInfo,
|
|
|
|
|
formats: { }
|
|
|
|
|
formats: {
|
|
|
|
|
CVLCPT_RCPT_YMD : dateFormat,
|
|
|
|
|
CVLCPT_PRCS_PRNMNT_DT : dateFormat
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* DatasetControl.on, Dataset.on
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$P.cvlcptControl.onCurrentChange = (item) => {
|
|
|
|
|
$P.cvlcptControl.onCurrentChange = (item) => {
|
|
|
|
|
$P.formFields.set(item);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* pageObject.function
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
|
|
|
|
|
$P.fnPrev = () => {
|
|
|
|
|
var prevKey = $P.parentRes.getPrevKey($("#crdnId--${pageName}").val());
|
|
|
|
|
if(prevKey != ""){
|
|
|
|
|
$P.fnGo(prevKey);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.fnNext = () => {
|
|
|
|
|
var nextKey = $P.parentRes.getNextKey($("#crdnId--${pageName}").val());
|
|
|
|
|
if(nextKey != ""){
|
|
|
|
|
$P.fnGo(nextKey);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.fnGo = (crdnId) => {
|
|
|
|
|
ajax.get({
|
|
|
|
|
url: $P.cvlcptControl.urls.getInfo,
|
|
|
|
|
data: { "crdnId" : crdnId },
|
|
|
|
|
headers: {
|
|
|
|
|
Accept: "application/json; charset=utf-8"
|
|
|
|
|
},
|
|
|
|
|
success : resp => {
|
|
|
|
|
$P.cvlcptControl.setData([resp.cvlcptInfo]);
|
|
|
|
|
var cs = $P.parentRes.getCountStatus($("#crdnId--${pageName}").val());
|
|
|
|
|
$("#countStauts--${pageName}").val(cs);
|
|
|
|
|
$P.parentRes.selectRow(crdnId);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* element.on
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$("#btnPrev--${pageName}").on("click", () => $P.fnPrev() );
|
|
|
|
|
$("#btnNext--${pageName}").on("click", () => $P.fnNext() );
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* 초기화
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$P.cvlcptControl.setData([${cvlcptInfo}]);
|
|
|
|
|
|
|
|
|
|
var cs = $P.parentRes.getCountStatus($("#crdnId--${pageName}").val());
|
|
|
|
|
$("#countStauts--${pageName}").val(cs);
|
|
|
|
|
});
|
|
|
|
|
</script>
|