|
|
|
@ -357,7 +357,8 @@ $(document).ready(function(){
|
|
|
|
|
urls : {
|
|
|
|
|
load : "",
|
|
|
|
|
getInfo : wctx.url("/${taskSeCd}/cvlc/cvlc01/020/info.do"),
|
|
|
|
|
update : wctx.url("/${taskSeCd}/cvlc/cvlc01/020/save.do")
|
|
|
|
|
update : wctx.url("/${taskSeCd}/cvlc/cvlc01/020/save.do"),
|
|
|
|
|
create : ""
|
|
|
|
|
},
|
|
|
|
|
keymapper:info => info ? info.CRDN_ID : "",
|
|
|
|
|
dataGetter:obj => obj.crdnInfo,
|
|
|
|
@ -367,11 +368,9 @@ $(document).ready(function(){
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.crdnControl.save = (info) => {
|
|
|
|
|
$P.crdnControl.save = (info, accept) => {
|
|
|
|
|
if (!info) return;
|
|
|
|
|
var item = $P.crdnControl.getCurrent("item"),
|
|
|
|
|
create = "added" == item.state;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var formData = new FormData(document.getElementById("frmFile--${pageName}"));
|
|
|
|
|
for(var key in info) {
|
|
|
|
|
var value = info[key];
|
|
|
|
@ -391,8 +390,6 @@ $(document).ready(function(){
|
|
|
|
|
$P.captureFileArr.forEach(item => formData.append("newFileList",item));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if($P.existFileArr.length > 0){
|
|
|
|
|
for(var i=0; i < $P.existFileArr.length; i++){
|
|
|
|
|
if($P.existFileArr[i].status == "delete"){
|
|
|
|
@ -404,12 +401,16 @@ $(document).ready(function(){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
formData.append("acceptYn", "Y");
|
|
|
|
|
if(accept){
|
|
|
|
|
formData.append("acceptYn", "Y");
|
|
|
|
|
} else {
|
|
|
|
|
formData.append("acceptYn", "N");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ajax.post({
|
|
|
|
|
url:!create ? $P.crdnControl.urls.update : $P.crdnControl.urls.create,
|
|
|
|
|
data: formData, contentType : false, processData : false,
|
|
|
|
|
success:resp => $P.crdnControl.onSave(resp)
|
|
|
|
|
url : $P.crdnControl.urls.update,
|
|
|
|
|
data : formData, contentType : false, processData : false,
|
|
|
|
|
success : resp => { $P.crdnControl.onSave(resp); }
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
@ -430,8 +431,35 @@ $(document).ready(function(){
|
|
|
|
|
|
|
|
|
|
$P.crdnControl.onSave = (resp) => {
|
|
|
|
|
if (resp.saved) {
|
|
|
|
|
|
|
|
|
|
dialog.alert("저장됐습니다.");
|
|
|
|
|
dialog.close("cvlcptInitialDataEditDialog--${openerPageName}");
|
|
|
|
|
|
|
|
|
|
if($("#levyExcldialog--${pageName}").length > 0){
|
|
|
|
|
dialog.close("levyExcldialog--${pageName}");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var crdnId = $("#crdnId--${pageName}").val();
|
|
|
|
|
|
|
|
|
|
var cursorKey = "";
|
|
|
|
|
|
|
|
|
|
var nextKey = $P.provided.getNextKey(crdnId);
|
|
|
|
|
if(nextKey != ""){
|
|
|
|
|
cursorKey = nextKey;
|
|
|
|
|
} else {
|
|
|
|
|
var prevKey = $P.provided.getPrevKey(crdnId);
|
|
|
|
|
if(prevKey != ""){
|
|
|
|
|
cursorKey = prevKey;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.provided.refreshList();
|
|
|
|
|
|
|
|
|
|
if(cursorKey != ""){
|
|
|
|
|
$P.fnGo(cursorKey);
|
|
|
|
|
} else {
|
|
|
|
|
dialog.close("cvlcptInitialDataEditDialog--${openerPageName}");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
/**************************************************************************
|
|
|
|
@ -540,7 +568,7 @@ $(document).ready(function(){
|
|
|
|
|
dialog.alert({
|
|
|
|
|
content:"현재 단속 정보를 저장하시겠습니까?",
|
|
|
|
|
onOK:() => {
|
|
|
|
|
$P.crdnControl.save($P.formFields.get());
|
|
|
|
|
$P.crdnControl.save($P.formFields.get(), true);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -604,8 +632,7 @@ $(document).ready(function(){
|
|
|
|
|
var params = {
|
|
|
|
|
"crdnId" : crdnId,
|
|
|
|
|
"levyExclSeCd" : levyExclSeCd,
|
|
|
|
|
"openerPageName" : "cvlc01020-info",
|
|
|
|
|
"callbackFuncName" : "pageObject['cvlc01020-info']['exclCallback']",
|
|
|
|
|
"saveCallbackFuncName" : "pageObject['cvlc01020-info']['exclSaveCallback']"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
ajax.get({
|
|
|
|
@ -614,7 +641,7 @@ $(document).ready(function(){
|
|
|
|
|
success : resp => {
|
|
|
|
|
|
|
|
|
|
dialog.open({
|
|
|
|
|
id : "levyExcldialog",
|
|
|
|
|
id : "levyExcldialog--${pageName}",
|
|
|
|
|
title : "부과제외 정보",
|
|
|
|
|
content : resp,
|
|
|
|
|
size : "lg",
|
|
|
|
@ -625,32 +652,13 @@ $(document).ready(function(){
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$P.exclCallback = function(saved){
|
|
|
|
|
if(saved){
|
|
|
|
|
|
|
|
|
|
var crdnId = $("#crdnId--${pageName}").val();
|
|
|
|
|
|
|
|
|
|
var cursorKey = "";
|
|
|
|
|
|
|
|
|
|
var nextKey = $P.provided.getNextKey(crdnId);
|
|
|
|
|
if(nextKey != ""){
|
|
|
|
|
cursorKey = nextKey;
|
|
|
|
|
} else {
|
|
|
|
|
var prevKey = $P.provided.getPrevKey(crdnId);
|
|
|
|
|
if(prevKey != ""){
|
|
|
|
|
cursorKey = prevKey;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.provided.refreshList();
|
|
|
|
|
|
|
|
|
|
if(cursorKey != ""){
|
|
|
|
|
$P.fnGo(cursorKey);
|
|
|
|
|
} else {
|
|
|
|
|
dialog.close("cvlcptInitialDataEditDialog--${openerPageName}");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$P.exclSaveCallback = function(exclInfo){
|
|
|
|
|
|
|
|
|
|
var mergeInfo = {...$P.formFields.get(), ...exclInfo}
|
|
|
|
|
|
|
|
|
|
$P.crdnControl.save(mergeInfo, false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.fnPrev = () => {
|
|
|
|
|
var prevKey = $P.provided.getPrevKey($("#crdnId--${pageName}").val());
|
|
|
|
@ -715,7 +723,7 @@ $(document).ready(function(){
|
|
|
|
|
dialog.alert({
|
|
|
|
|
content : "현 자료의 복사본을 생성하겠습니까?",
|
|
|
|
|
onOK : () => {
|
|
|
|
|
|
|
|
|
|
//$P.crdnControl.copy($P.formFields.get());
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|