|
|
|
@ -7,7 +7,7 @@
|
|
|
|
|
<form id="frmEdit--${pageName}">
|
|
|
|
|
<input id="crdnId--${pageName}" name="crdnId" type="hidden" data-map="CRDN_ID" />
|
|
|
|
|
<input id="cvlcptLinkId--${pageName}" name="cvlcptLinkId" type="hidden" data-map="CVLCPT_LINK_ID" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="row g-1">
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
<label for="cvlcptAplyCn--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-center">
|
|
|
|
@ -25,7 +25,7 @@
|
|
|
|
|
></textarea>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="col-md-12">
|
|
|
|
|
<label for="cvlcptPrcsRsltCn--${pageName}" class="required w-px-150 bg-lighter pe-2 col-form-label text-sm-center">
|
|
|
|
|
답변 내용
|
|
|
|
@ -37,7 +37,7 @@
|
|
|
|
|
required rows="10" style="width:100%"></textarea>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
변경할내용이있으면 수정하시오.
|
|
|
|
|
</div>
|
|
|
|
@ -63,35 +63,35 @@ pageObject.childReq.push({
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$(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({
|
|
|
|
|
urls : {
|
|
|
|
|
load : "",
|
|
|
|
|
urls : {
|
|
|
|
|
load : "",
|
|
|
|
|
getInfo : wctx.url("/"+$P.taskSeCd+"/cvlc/cvlc01/060/info.do"),
|
|
|
|
|
update : wctx.url("/"+$P.taskSeCd+"/cvlc/cvlc01/060/update.do")
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
keymapper:info => info ? info.CRDN_ID : "",
|
|
|
|
|
dataGetter:obj => obj.cvlcptInfo,
|
|
|
|
|
formats: {
|
|
|
|
|
formats: {
|
|
|
|
|
CVLCPT_RCPT_YMD : dateFormat,
|
|
|
|
|
CVLCPT_PRCS_PRNMNT_DT : dateFormat
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.cvlcptControl.save = (info) => {
|
|
|
|
|
if (!info) return;
|
|
|
|
|
|
|
|
|
@ -100,77 +100,77 @@ $(document).ready(function() {
|
|
|
|
|
data : info,
|
|
|
|
|
success : resp => { $P.cvlcptControl.onSave(resp); }
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* DatasetControl.on, Dataset.on
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$P.cvlcptControl.onCurrentChange = (item) => {
|
|
|
|
|
$P.formFields.set(item);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.cvlcptControl.onSave = (resp) => {
|
|
|
|
|
if (resp.saved) {
|
|
|
|
|
dialog.alert("저장됐습니다.");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* 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: {
|
|
|
|
|
headers: {
|
|
|
|
|
Accept: "application/json; charset=utf-8"
|
|
|
|
|
},
|
|
|
|
|
success : resp => {
|
|
|
|
|
var cvlcptInfo = resp.cvlcptInfo;
|
|
|
|
|
cvlcptInfo.CVLCPT_APLY_CN = escapeHTMLEntity(cvlcptInfo.CVLCPT_APLY_CN);
|
|
|
|
|
$P.cvlcptControl.setData([cvlcptInfo]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var cs = $P.parentRes.getCountStatus($("#crdnId--${pageName}").val());
|
|
|
|
|
$("#countStauts--${pageName}").val(cs);
|
|
|
|
|
$P.parentRes.selectRow(crdnId);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.fnSave = () => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(!customValidate($("#frmEdit--${pageName} input"))) return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(confirm("현재 답변 내용을 저장하시겠습니까?")){
|
|
|
|
|
$P.cvlcptControl.save($P.formFields.get());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* element.on
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$("#btnPrev--${pageName}").on("click", () => $P.fnPrev() );
|
|
|
|
|
$("#btnNext--${pageName}").on("click", () => $P.fnNext() );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#btnSave--${pageName}").on("click", () => $P.fnSave() );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* 초기화
|
|
|
|
|
**************************************************************************/
|
|
|
|
@ -180,9 +180,13 @@ $(document).ready(function() {
|
|
|
|
|
var cs = $P.parentRes.getCountStatus($("#crdnId--${pageName}").val());
|
|
|
|
|
$("#countStauts--${pageName}").val(cs);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let openerPageName = "${openerPageName}";
|
|
|
|
|
|
|
|
|
|
if (openerPageName == "sprt02020") {
|
|
|
|
|
$("#btnSave--${pageName}").hide();
|
|
|
|
|
} else {
|
|
|
|
|
$("#btnSave--${pageName}").show();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
</script>
|