+
@@ -44,44 +44,44 @@
-
-
-
-
+
의견제출 정보
-
-
+
발송반송 정보
-
-
+
처리상세 정보
-
-
+
부과체납 정보
-
-
+
수납 정보
-
-
+
민원상담 정보
@@ -91,8 +91,8 @@
단속 정보
의견제출 정보
발송반송 정보
- 처리상세 정보
- 부과체납 정보
+ 처리상세 정보
+ 부과체납 정보
수납 정보
민원상담 정보
@@ -104,471 +104,488 @@
/**************************************************************************
* Global Variable
**************************************************************************/
- // URL
- var ${pageName}PrefixUrl = "/sprt/sprt02";
+ pageObject["${pageName}"] = {};
+
// infoDialog 호출 용도(view 조회(편집불가), create 등록, update 수정)
var ${pageName}CallPurpose = "${callPurpose}";
- // FormFields
- var ${pageName}Fields = new FimsFormFields("#frmEdit--${pageName}");
- // 자료 이동을 위한 자료의 Index. 0부터 시작.
- var curDataIndex${pageName};
- // 현재 탭의 위치
- var activeTabIndex${pageName} = 0;
- /**************************************************************************
- * DatasetControl
- **************************************************************************/
- var ${pageName}Control = new DatasetControl({
- prefix : "totalInfoMain"
- , prefixName : "개별총정보"
- , keymapper : info => info ? info.CRDN_ID : ""
- , dataGetter : obj => obj.totalInfo
- , formats : {
- CRDN_YMD_TM : datetimeFormat
- , CRDN_STTS_CHG_DT : datetimeFormat
- }
- });
+ $(document).ready(function() {
+ // pageObject
+ var $P = pageObject["${pageName}"];
+
+ // 자료 이동을 위한 자료의 Index. 0부터 시작.
+ $P.curDataIndex;
+ // 현재 탭의 위치
+ $P.activeTabIndex = 0;
+ // FormFields
+ $P.formFields = new FimsFormFields("#frmEdit--${pageName}");
+
+ /**************************************************************************
+ * DatasetControl
+ **************************************************************************/
+ $P.mainControl = new DatasetControl({
+ prefix : "totalInfoMain"
+ , prefixName : "개별총정보"
+ , keymapper : info => info ? info.CRDN_ID : ""
+ , dataGetter : obj => obj.totalInfo
+ , formats : {
+ CRDN_YMD_TM : datetimeFormat
+ , CRDN_STTS_CHG_DT : datetimeFormat
+ }
+ });
+
+ /**************************************************************************
+ * DatasetControl 이벤트
+ **************************************************************************/
+ $P.mainControl.onCurrentChange = item => {
+ if (!item) return;
- ${pageName}Control.onCurrentChange = item => {
- if (!item) return;
+ // Dataset 셋팅
+ $P.formFields.set(item);
- // Dataset 셋팅
- ${pageName}Fields.set(item);
+ // 건수 표기
+ let controlName = "${callControlName}";
+ if (controlName != "noControlName") {
+ $P.fnChangeCountStauts();
+ }
+ // 자료 수정
+ $P.useDataEdit(item);
+ }
+
+ /**************************************************************************
+ * 네이게이션 Event
+ **************************************************************************/
// 건수 표기
- let controlName = "${callControlName}";
- if (controlName != "noControlName") {
- fnChangeCountStauts${pageName}();
+ $P.fnChangeCountStauts = () => {
+ // $P.curDataIndex 에 값이 없다면..
+ if ($P.curDataIndex == null) {
+ let mainDataItems = ${callControlName}.dataset._items;
+ let curCrdnId = $P.mainControl.dataset.getValue("CRDN_ID");
+
+ for (iLoop = 0; iLoop < mainDataItems.length; iLoop++) {
+ if (mainDataItems[iLoop].data.CRDN_ID == curCrdnId) {
+ $P.curDataIndex = iLoop;
+ break;
+ }
+ }
+ }
+
+ let viewNumber = $P.curDataIndex + 1;
+
+ $("#countStauts--${pageName}").val(viewNumber + " of " + ${callControlName}.dataset._items.length);
}
- // 자료 수정
- useDataEdit${pageName}(item);
- }
+ // 이전 자료 조회
+ $P.fnPrev = () => {
+ let mainDataItems = ${callControlName}.dataset._items;
+ let curCrdnId = $P.mainControl.dataset.getValue("CRDN_ID");
- /**************************************************************************
- * 네이게이션 Event
- **************************************************************************/
- // 건수 표기
- fnChangeCountStauts${pageName} = () => {
- // curDataIndex${pageName} 에 값이 없다면..
- if (curDataIndex${pageName} == null) {
+ // 초기 값은 callControl dataset 의 총 건수 - 1
+ if ($P.curDataIndex == null) {
+ $P.curDataIndex = mainDataItems.length - 1;
+ }
+
+ for (iLoop = $P.curDataIndex; iLoop >= 0; iLoop--) {
+ if (mainDataItems[iLoop].data.CRDN_ID == curCrdnId) {
+ if (iLoop - 1 < 0) { return; } // 종료
+
+ $P.curDataIndex = iLoop - 1;
+ break;
+ }
+ }
+
+ let crdnId = mainDataItems[$P.curDataIndex].data.CRDN_ID;
+
+ // 단속 ID 가 없다면.. return
+ if (crdnId == null || crdnId == "") {
+ return;
+ }
+
+ let params = {
+ callPurpose : "view"
+ , callControlName : "${callControlName}"
+ , crdnId : crdnId
+ , sggCd : mainDataItems[$P.curDataIndex].data.SGG_CD
+ , taskSeCd : mainDataItems[$P.curDataIndex].data.TASK_SE_CD
+ , delYN : "N"
+ };
+
+ $P.refreshList(params);
+ }
+
+ // 다음 자료 조회
+ $P.fnNext = () => {
let mainDataItems = ${callControlName}.dataset._items;
- let curCrdnId = ${pageName}Control.dataset.getValue("CRDN_ID");
+ let curCrdnId = $P.mainControl.dataset.getValue("CRDN_ID");
+
+ // 초기 값은 0
+ if ($P.curDataIndex == null) {
+ $P.curDataIndex = 0;
+ }
- for (iLoop = 0; iLoop < mainDataItems.length; iLoop++) {
+ for (iLoop = $P.curDataIndex; iLoop < mainDataItems.length; iLoop++) {
if (mainDataItems[iLoop].data.CRDN_ID == curCrdnId) {
- curDataIndex${pageName} = iLoop;
+ if (iLoop + 1 >= mainDataItems.length) return; // 종료
+
+ $P.curDataIndex = iLoop + 1;
+
break;
}
}
+
+ let crdnId = mainDataItems[$P.curDataIndex].data.CRDN_ID;
+
+ // 단속 ID 가 없다면.. return
+ if (crdnId == null || crdnId == "") {
+ return;
+ }
+
+ let params = {
+ callPurpose : "view"
+ , callControlName : "${callControlName}"
+ , crdnId : crdnId
+ , sggCd : mainDataItems[$P.curDataIndex].data.SGG_CD
+ , taskSeCd : mainDataItems[$P.curDataIndex].data.TASK_SE_CD
+ , delYN : "N"
+ };
+
+ $P.refreshList(params);
+ }
+
+ /**************************************************************************
+ * 사용자 함수(function)
+ **************************************************************************/
+ // 자료 삭제 가능 여부
+ $P.useDataEdit = (item) => {
+ // 삭제 자료일 경우 빨간색으로 변경
+ let elem = document.getElementById("crdnSttsNm--${pageName}");
+
+ if (item.data.CRDN_STTS_CD == "99") {
+ elem.classList.remove("text-primary");
+ elem.classList.add("text-danger");
+ } else {
+ elem.classList.remove("text-danger");
+ elem.classList.add("text-primary");
+ }
+ }
+
+ //
+ $P.fnClose = (isDataReLoad) => {
+ dialog.close($P.mainControl.prefix + "Dialog");
+
+ let controlName = "${callControlName}";
+ if (isDataReLoad && controlName != "noControlName") {
+ ${callControlName}._load();
+ }
+ }
+
+ // 자료 재조회
+ $P.refreshList = (params) => {
+ if (!params) return;
+
+ ajax.get({
+ url : wctx.url(params.taskSeCd + "/sprt/sprt02/010/main.do")
+ , headers: { Accept: "application/json; charset=utf-8" } // json
+ , data : params || {}
+ , success : resp => {
+ if (resp.totalInfo) {
+ // 최상단 단속 Data 셋팅
+ $P.mainControl.setData([resp.totalInfo]);
+
+ if ($P.activeTabIndex == 0) {
+ $P.fnCrdnPayerInfo(); // 단속 납부자 Data 셋팅
+ } else if ($P.activeTabIndex == 1) {
+ $P.fnOpnnSbmsnInfo(); // 의견제출 정보
+ } else if ($P.activeTabIndex == 2) {
+ $P.fnSndngInfo(); // 발송 반송 정보
+ } else if ($P.activeTabIndex == 3) {
+ $P.fnPrcsInfo(); // 처리 상세 정보
+ } else if ($P.activeTabIndex == 4) {
+ $P.fnLevyInfo(); // 부과체납 정보
+ } else if ($P.activeTabIndex == 5) {
+ $P.fnRcvmtInfo(); // 수납 정보
+ } else if ($P.activeTabIndex == 6) {
+ $P.fnCvlcptDscsnInfo(); // 민원상담 정보
+ }
+ }
+ }
+ });
+ }
+
+ $P.getCrdnPayerInfo = (params) => {
+ if (!params) return;
+
+ ajax.get({
+ url : wctx.url("/" + params.taskSeCd + "/sprt/sprt02/020/info.do")
+ , data : params || {}
+ , success : resp => {
+ $("#crdnPayerInfo").html(resp);
+ }
+ });
}
- let viewNumber = curDataIndex${pageName} + 1;
+ $P.getOpnnSbmsnInfo = (params) => {
+ if (!params) return;
- $("#countStauts--${pageName}").val(viewNumber + " of " + ${callControlName}.dataset._items.length);
- }
+ ajax.get({
+ url : wctx.url("/" + params.taskSeCd + "/sprt/sprt02/030/info.do")
+ , data : params || {}
+ , success : resp => {
+ $("#opnnSbmsnInfo").html(resp);
+ }
+ });
+ }
- // 이전 자료 조회
- fnPrev${pageName} = () => {
- let mainDataItems = ${callControlName}.dataset._items;
- let curCrdnId = ${pageName}Control.dataset.getValue("CRDN_ID");
+ $P.getSndngInfo = (params) => {
+ if (!params) return;
- // 초기 값은 callControl dataset 의 총 건수 - 1
- if (curDataIndex${pageName} == null) {
- curDataIndex${pageName} = mainDataItems.length - 1;
+ ajax.get({
+ url : wctx.url("/" + params.taskSeCd + "/sprt/sprt02/040/info.do")
+ , data : params || {}
+ , success : resp => {
+ $("#sndngInfo").html(resp);
+ }
+ });
}
- for (iLoop = curDataIndex${pageName}; iLoop >= 0; iLoop--) {
- if (mainDataItems[iLoop].data.CRDN_ID == curCrdnId) {
- if (iLoop - 1 < 0) { return; } // 종료
+ $P.getPrcsInfo = (params) => {
+ if (!params) return;
- curDataIndex${pageName} = iLoop - 1;
- break;
- }
+ ajax.get({
+ url : wctx.url("/" + params.taskSeCd + "/sprt/sprt02/050/info.do")
+ , data : params || {}
+ , success : resp => {
+ $("#prcsInfo").html(resp);
+ }
+ });
}
- let crdnId = mainDataItems[curDataIndex${pageName}].data.CRDN_ID;
+ $P.getLevyInfo = (params) => {
+ if (!params) return;
- // 단속 ID 가 없다면.. return
- if (crdnId == null || crdnId == "") {
- return;
+ ajax.get({
+ url : wctx.url("/" + params.taskSeCd + "/sprt/sprt02/060/info.do")
+ , data : params || {}
+ , success : resp => {
+ $("#levyInfo").html(resp);
+ }
+ });
}
- let params = {
- callPurpose : "view"
- , callControlName : "${callControlName}"
- , crdnId : crdnId
- , sggCd : mainDataItems[curDataIndex${pageName}].data.SGG_CD
- , taskSeCd : mainDataItems[curDataIndex${pageName}].data.TASK_SE_CD
- , delYN : "N"
- };
-
- refreshList${pageName}(params);
- }
-
- // 다음 자료 조회
- fnNext${pageName} = () => {
- let mainDataItems = ${callControlName}.dataset._items;
- let curCrdnId = ${pageName}Control.dataset.getValue("CRDN_ID");
-
- // 초기 값은 0
- if (curDataIndex${pageName} == null) {
- curDataIndex${pageName} = 0;
+ $P.getRcvmtInfo = (params) => {
+ if (!params) return;
+
+ ajax.get({
+ url : wctx.url("/" + params.taskSeCd + "/sprt/sprt02/070/info.do")
+ , data : params || {}
+ , success : resp => {
+ $("#rcvmtInfo").html(resp);
+ }
+ });
}
- for (iLoop = curDataIndex${pageName}; iLoop < mainDataItems.length; iLoop++) {
- if (mainDataItems[iLoop].data.CRDN_ID == curCrdnId) {
- if (iLoop + 1 >= mainDataItems.length) { return; } // 종료
+ $P.getCvlcptDscsnInfo = (params) => {
+ if (!params) return;
- curDataIndex${pageName} = iLoop + 1;
- break;
- }
+ ajax.get({
+ url : wctx.url("/" + params.taskSeCd + "/sprt/sprt02/080/info.do")
+ , data : params || {}
+ , success : resp => {
+ $("#cvlcptDscsnInfo").html(resp);
+ }
+ });
}
- let crdnId = mainDataItems[curDataIndex${pageName}].data.CRDN_ID;
+ /**************************************************************************
+ * 탭 clickEvent
+ **************************************************************************/
+ // 단속 정보
+ $P.fnCrdnPayerInfo = () => {
+ let crdnId = $P.mainControl.dataset.getValue("CRDN_ID");
+
+ // 단속 ID 가 없다면.. return
+ if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
- // 단속 ID 가 없다면.. return
- if (crdnId == null || crdnId == "") {
- return;
+ // 탭 Index
+ $P.activeTabIndex = 0;
+
+ let params = {
+ callPurpose : "view"
+ , crdnId : crdnId
+ , sggCd : $P.mainControl.dataset.getValue("SGG_CD")
+ , taskSeCd : $P.mainControl.dataset.getValue("TASK_SE_CD")
+ , delYN : "N"
+ };
+
+ $P.getCrdnPayerInfo(params);
}
- let params = {
- callPurpose : "view"
- , callControlName : "${callControlName}"
- , crdnId : crdnId
- , sggCd : mainDataItems[curDataIndex${pageName}].data.SGG_CD
- , taskSeCd : mainDataItems[curDataIndex${pageName}].data.TASK_SE_CD
- , delYN : "N"
- };
+ // 의견제출 정보
+ $P.fnOpnnSbmsnInfo = () => {
+ let crdnId = $P.mainControl.dataset.getValue("CRDN_ID");
- refreshList${pageName}(params);
- }
+ // 단속 ID 가 없다면.. return
+ if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
- /**************************************************************************
- * 사용자 함수(function)
- **************************************************************************/
- // 자료 삭제 가능 여부
- useDataEdit${pageName} = (item) => {
- // 삭제 자료일 경우 빨간색으로 변경
- let elem = document.getElementById("crdnSttsNm--${pageName}");
-
- if (item.data.CRDN_STTS_CD == "99") {
- elem.classList.remove("text-primary");
- elem.classList.add("text-danger");
- } else {
- elem.classList.remove("text-danger");
- elem.classList.add("text-primary");
+ // 탭 Index
+ $P.activeTabIndex = 1;
+
+ let params = {
+ callPurpose : "view"
+ , crdnId : crdnId
+ , sggCd : $P.mainControl.dataset.getValue("SGG_CD")
+ , taskSeCd : $P.mainControl.dataset.getValue("TASK_SE_CD")
+ , delYN : "N"
+ };
+
+ $P.getOpnnSbmsnInfo(params);
}
- }
- //
- fnClose${pageName} = (isDataReLoad) => {
- dialog.close(${pageName}Control.prefix + "Dialog");
+ // 발송 반송 정보
+ $P.fnSndngInfo = () => {
+ let crdnId = $P.mainControl.dataset.getValue("CRDN_ID");
+
+ // 단속 ID 가 없다면.. return
+ if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
- let controlName = "${callControlName}";
- if (isDataReLoad && controlName != "noControlName") {
- ${callControlName}._load();
+ // 탭 Index
+ $P.activeTabIndex = 2;
+
+ let params = {
+ callPurpose : "view"
+ , crdnId : crdnId
+ , sggCd : $P.mainControl.dataset.getValue("SGG_CD")
+ , taskSeCd : $P.mainControl.dataset.getValue("TASK_SE_CD")
+ , delYN : "N"
+ };
+
+ $P.getSndngInfo(params);
}
- }
-
- // 자료 재조회
- refreshList${pageName} = (params) => {
- if (!params) return;
-
- ajax.get({
- url : wctx.url(params.taskSeCd + "/sprt/sprt02/010/main.do")
- , headers: { Accept: "application/json; charset=utf-8" } // json
- , data : params || {}
- , success : resp => {
- if (resp.totalInfo) {
- // 최상단 단속 Data 셋팅
- ${pageName}Control.setData([resp.totalInfo]);
-
- if (activeTabIndex${pageName} == 0) {
- fnCrdnPayerInfo${pageName}(); // 단속 납부자 Data 셋팅
- } else if (activeTabIndex${pageName} == 1) {
- fnOpnnSbmsnInfo${pageName}(); // 의견제출 정보
- } else if (activeTabIndex${pageName} == 2) {
- fnSndngInfo${pageName}(); // 발송 반송 정보
- } else if (activeTabIndex${pageName} == 3) {
- fnPrcsDtlInfo${pageName}(); // 처리 상세 정보
- } else if (activeTabIndex${pageName} == 4) {
- fnLevyNpmntInfo${pageName}(); // 부과체납 정보
- } else if (activeTabIndex${pageName} == 5) {
- fnRcvmtInfo${pageName}(); // 수납 정보
- } else if (activeTabIndex${pageName} == 6) {
- fnCvlcptDscsnInfo${pageName}(); // 민원상담 정보
- }
- }
- }
- });
- }
- getCrdnPayerInfo${pageName} = (params) => {
- if (!params) return;
+ // 처리 정보
+ $P.fnPrcsInfo = () => {
+ let crdnId = $P.mainControl.dataset.getValue("CRDN_ID");
- ajax.get({
- url : wctx.url(params.taskSeCd + "/sprt/sprt02/020/info.do")
- , data : params || {}
- , success : resp => {
- $("#crdnPayerInfo").html(resp);
- }
- });
- }
+ // 단속 ID 가 없다면.. return
+ if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
- getOpnnSbmsnInfo${pageName} = (params) => {
- if (!params) return;
+ // 탭 Index
+ $P.activeTabIndex = 3;
- ajax.get({
- url : wctx.url(params.taskSeCd + "/sprt/sprt02/030/info.do")
- , data : params || {}
- , success : resp => {
- $("#opnnSbmsnInfo").html(resp);
- }
- });
- }
+ let params = {
+ callPurpose : "view"
+ , crdnId : crdnId
+ , sggCd : $P.mainControl.dataset.getValue("SGG_CD")
+ , taskSeCd : $P.mainControl.dataset.getValue("TASK_SE_CD")
+ , rtpyrId : $P.mainControl.dataset.getValue("RTPYR_ID")
+ , delYN : "N"
+ };
- getSndngInfo${pageName} = (params) => {
- if (!params) return;
+ $P.getPrcsInfo(params);
+ }
- ajax.get({
- url : wctx.url(params.taskSeCd + "/sprt/sprt02/040/info.do")
- , data : params || {}
- , success : resp => {
- $("#sndngInfo").html(resp);
- }
- });
- }
+ // 부과체납 정보
+ $P.fnLevyInfo = () => {
+ let crdnId = $P.mainControl.dataset.getValue("CRDN_ID");
- getPrcsDtlInfo${pageName} = (params) => {
- if (!params) return;
+ // 단속 ID 가 없다면.. return
+ if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
- ajax.get({
- url : wctx.url(params.taskSeCd + "/sprt/sprt02/050/info.do")
- , data : params || {}
- , success : resp => {
- $("#prcsDtlInfo").html(resp);
- }
- });
- }
+ // 탭 Index
+ $P.activeTabIndex = 4;
- getLevyNpmntInfo${pageName} = (params) => {
- if (!params) return;
+ let params = {
+ callPurpose : "view"
+ , crdnId : crdnId
+ , sggCd : $P.mainControl.dataset.getValue("SGG_CD")
+ , taskSeCd : $P.mainControl.dataset.getValue("TASK_SE_CD")
+ , delYN : "N"
+ };
- ajax.get({
- url : wctx.url(params.taskSeCd + "/sprt/sprt02/060/info.do")
- , data : params || {}
- , success : resp => {
- $("#levyNpmntInfo").html(resp);
- }
- });
- }
+ $P.getLevyInfo(params);
+ }
- getRcvmtInfo${pageName} = (params) => {
- if (!params) return;
+ // 수납 정보
+ $P.fnRcvmtInfo = () => {
+ let crdnId = $P.mainControl.dataset.getValue("CRDN_ID");
- ajax.get({
- url : wctx.url(params.taskSeCd + "/sprt/sprt02/070/info.do")
- , data : params || {}
- , success : resp => {
- $("#rcvmtInfo").html(resp);
- }
- });
- }
+ // 단속 ID 가 없다면.. return
+ if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
- getCvlcptDscsnInfo${pageName} = (params) => {
- if (!params) return;
+ // 탭 Index
+ $P.activeTabIndex = 5;
- ajax.get({
- url : wctx.url(params.taskSeCd + "/sprt/sprt02/080/info.do")
- , data : params || {}
- , success : resp => {
- $("#cvlcptDscsnInfo").html(resp);
- }
- });
- }
+ let params = {
+ callPurpose : "view"
+ , crdnId : crdnId
+ , sggCd : $P.mainControl.dataset.getValue("SGG_CD")
+ , taskSeCd : $P.mainControl.dataset.getValue("TASK_SE_CD")
+ , delYN : "N"
+ };
- /**************************************************************************
- * 탭 clickEvent
- **************************************************************************/
- // 단속 정보
- fnCrdnPayerInfo${pageName} = () => {
- let crdnId = ${pageName}Control.dataset.getValue("CRDN_ID");
-
- // 단속 ID 가 없다면.. return
- if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
-
- // 탭 Index
- activeTabIndex${pageName} = 0;
-
- let params = {
- callPurpose : "view"
- , crdnId : crdnId
- , sggCd : ${pageName}Control.dataset.getValue("SGG_CD")
- , taskSeCd : ${pageName}Control.dataset.getValue("TASK_SE_CD")
- , delYN : "N"
- };
-
- getCrdnPayerInfo${pageName}(params);
- }
-
- // 의견제출 정보
- fnOpnnSbmsnInfo${pageName} = () => {
- let crdnId = ${pageName}Control.dataset.getValue("CRDN_ID");
-
- // 단속 ID 가 없다면.. return
- if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
-
- // 탭 Index
- activeTabIndex${pageName} = 1;
-
- let params = {
- callPurpose : "view"
- , crdnId : crdnId
- , sggCd : ${pageName}Control.dataset.getValue("SGG_CD")
- , taskSeCd : ${pageName}Control.dataset.getValue("TASK_SE_CD")
- , delYN : "N"
- };
-
- getOpnnSbmsnInfo${pageName}(params);
- }
-
- // 발송 반송 정보
- fnSndngInfo${pageName} = () => {
- let crdnId = ${pageName}Control.dataset.getValue("CRDN_ID");
-
- // 단속 ID 가 없다면.. return
- if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
-
- // 탭 Index
- activeTabIndex${pageName} = 2;
-
- let params = {
- callPurpose : "view"
- , crdnId : crdnId
- , sggCd : ${pageName}Control.dataset.getValue("SGG_CD")
- , taskSeCd : ${pageName}Control.dataset.getValue("TASK_SE_CD")
- , delYN : "N"
- };
-
- getSndngInfo${pageName}(params);
- }
-
- // 처리 상세 정보
- fnPrcsDtlInfo${pageName} = () => {
- let crdnId = ${pageName}Control.dataset.getValue("CRDN_ID");
-
- // 단속 ID 가 없다면.. return
- if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
-
- // 탭 Index
- activeTabIndex${pageName} = 3;
-
- let params = {
- callPurpose : "view"
- , crdnId : crdnId
- , sggCd : ${pageName}Control.dataset.getValue("SGG_CD")
- , taskSeCd : ${pageName}Control.dataset.getValue("TASK_SE_CD")
- , rtpyrId : ${pageName}Control.dataset.getValue("RTPYR_ID")
- , delYN : "N"
- };
-
- getPrcsDtlInfo${pageName}(params);
- }
-
- // 부과체납 정보
- fnLevyNpmntInfo${pageName} = () => {
- let crdnId = ${pageName}Control.dataset.getValue("CRDN_ID");
-
- // 단속 ID 가 없다면.. return
- if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
-
- // 탭 Index
- activeTabIndex${pageName} = 4;
-
- let params = {
- callPurpose : "view"
- , crdnId : crdnId
- , sggCd : ${pageName}Control.dataset.getValue("SGG_CD")
- , taskSeCd : ${pageName}Control.dataset.getValue("TASK_SE_CD")
- , delYN : "N"
- };
-
- getLevyNpmntInfo${pageName}(params);
- }
-
- // 수납 정보
- fnRcvmtInfo${pageName} = () => {
- let crdnId = ${pageName}Control.dataset.getValue("CRDN_ID");
-
- // 단속 ID 가 없다면.. return
- if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
-
- // 탭 Index
- activeTabIndex${pageName} = 5;
-
- let params = {
- callPurpose : "view"
- , crdnId : crdnId
- , sggCd : ${pageName}Control.dataset.getValue("SGG_CD")
- , taskSeCd : ${pageName}Control.dataset.getValue("TASK_SE_CD")
- , delYN : "N"
- };
-
- getRcvmtInfo${pageName}(params);
- }
-
- // 민원상담 정보
- fnCvlcptDscsnInfo${pageName} = () => {
- let crdnId = ${pageName}Control.dataset.getValue("CRDN_ID");
-
- // 단속 ID 가 없다면.. return
- if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
-
- // 탭 Index
- activeTabIndex${pageName} = 6;
-
- let params = {
- callPurpose : "view"
- , inquiryCondition : "crdnId_vhrno"
- , crdnId : crdnId
- , sggCd : ${pageName}Control.dataset.getValue("SGG_CD")
- , taskSeCd : ${pageName}Control.dataset.getValue("TASK_SE_CD")
- , vhrno : ${pageName}Control.dataset.getValue("VHRNO")
- , delYN : "N"
- };
-
- getCvlcptDscsnInfo${pageName}(params);
- }
+ $P.getRcvmtInfo(params);
+ }
- /**************************************************************************
- * 초기 셋팅
- **************************************************************************/
- // 이벤트 설정
- setEvent${pageName} = () => {
+ // 민원상담 정보
+ $P.fnCvlcptDscsnInfo = () => {
+ let crdnId = $P.mainControl.dataset.getValue("CRDN_ID");
- }
+ // 단속 ID 가 없다면.. return
+ if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
- // 기본 데이터 설정
- initData${pageName} = () => {
- curDataIndex${pageName} = null; // 화면이 열릴때 초기 값으로 null로 설정해야 건수가 정상 표시 된다.
- }
+ // 탭 Index
+ $P.activeTabIndex = 6;
- /**************************************************************************
- * script 진입
- **************************************************************************/
- $(document).ready(function() {
+ let params = {
+ callPurpose : "view"
+ , inquiryCondition : "crdnId_vhrno"
+ , crdnId : crdnId
+ , sggCd : $P.mainControl.dataset.getValue("SGG_CD")
+ , taskSeCd : $P.mainControl.dataset.getValue("TASK_SE_CD")
+ , vhrno : $P.mainControl.dataset.getValue("VHRNO")
+ , delYN : "N"
+ };
+
+ $P.getCvlcptDscsnInfo(params);
+ }
+
+ /**************************************************************************
+ * 초기 셋팅
+ **************************************************************************/
// 이벤트 설정
- setEvent${pageName}();
+ $P.setEvent = () => {
+ // 버튼 이벤트
+ $("#btnPrev--${pageName}").on("click", () => $P.fnPrev()); // 이전
+ $("#btnNext--${pageName}").on("click", () => $P.fnNext()); // 다음
+ $("#btnCrdnPayer--${pageName}").on("click", () => $P.fnCrdnPayerInfo()); // 단속 정보
+ $("#btnOpnnSbmsn--${pageName}").on("click", () => $P.fnOpnnSbmsnInfo()); // 의견제출 정보
+ $("#btnSndng--${pageName}").on("click", () => $P.fnSndngInfo()); // 발송반송 정보
+ $("#btnPrcs--${pageName}").on("click", () => $P.fnPrcsInfo()); // 처리상세 정보
+ $("#btnLevy--${pageName}").on("click", () => $P.fnLevyInfo()); // 부과체납 정보
+ $("#btnRcvmt--${pageName}").on("click", () => $P.fnRcvmtInfo()); // 수납 정보
+ $("#btnCvlcptDscsn--${pageName}").on("click", () => $P.fnCvlcptDscsnInfo()); // 민원상담 정보
+ }
// 기본 데이터 설정
- initData${pageName}();
+ $P.initData = () => {
+ $P.curDataIndex = null; // 화면이 열릴때 초기 값으로 null로 설정해야 건수가 정상 표시 된다.
+ }
+
+ /**************************************************************************
+ * script 진입시 실행 함수
+ **************************************************************************/
+ // 1. 이벤트 설정
+ $P.setEvent();
+
+ // 2. 기본 데이터 설정
+ $P.initData();
- // Dataset 설정
- ${pageName}Control.setData([${totalInfo}]);
+ // 3. Dataset 설정
+ $P.mainControl.setData([${totalInfo}]);
- // 단속, 납부자 정보
- fnCrdnPayerInfo${pageName}();
+ // 4. 단속, 납부자 정보 조회
+ $P.fnCrdnPayerInfo();
});
diff --git a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt02020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt02020-info.jsp
index 63fe147a..f2ffabe2 100644
--- a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt02020-info.jsp
+++ b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt02020-info.jsp
@@ -7,8 +7,8 @@
@@ -247,7 +229,7 @@
-
+
@@ -286,863 +268,620 @@
-
-
-
-
-
- 사진 편집
-
-
- 사진 추가
- 사진 삭제
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/src/main/webapp/resources/js/fims/photo-main.js b/src/main/webapp/resources/js/fims/photo-main.js
index 492057bc..5701c2b3 100644
--- a/src/main/webapp/resources/js/fims/photo-main.js
+++ b/src/main/webapp/resources/js/fims/photo-main.js
@@ -1,9 +1,9 @@
LoadScript("sortableScript","/resources/3rd-party/sneat/libs/sortablejs/sortable.js");
function settingPhotoMain(pageName, crdnIdElementId, carInfoFunc, carLinkFunc){
-
+
var $P = pageObject[pageName];
-
+
$P.existFileArr = [];
$P.localUploadArr = [];
@@ -21,8 +21,8 @@ function settingPhotoMain(pageName, crdnIdElementId, carInfoFunc, carLinkFunc){
//파일처리 버튼
//추가버튼
- $("#btnAddFile--"+pageName).on('click', () => {
- $("#inputUploadSet--"+pageName).trigger("click");
+ $("#btnAddFile--"+pageName).on('click', () => {
+ $("#inputUploadSet--"+pageName).trigger("click");
});
//동영상캡쳐버튼
$("#btnOpenVideoCapture--"+pageName).on('click', () => {
@@ -70,7 +70,7 @@ function settingPhotoMain(pageName, crdnIdElementId, carInfoFunc, carLinkFunc){
});
$P.uploadSet = uploadSupport("#inputUploadSet--"+pageName);
-
+
$P.uploadSet.onDatasetChange = () => {
var files = $P.uploadSet.getDataset();
@@ -78,15 +78,15 @@ function settingPhotoMain(pageName, crdnIdElementId, carInfoFunc, carLinkFunc){
files.forEach(function(item){
$P.localUploadArr.push(item);
});
-
+
$P.updateFileInfo("insert");
}
};
-
+
$P.uploadSet.onRemove = () => { };
-
-
+
+
//이미지 HTML태그 문자열 반환
$P.fnMakeImgForExistFile = (fileArr) => {
var tagsTextArr = [];
@@ -98,7 +98,14 @@ function settingPhotoMain(pageName, crdnIdElementId, carInfoFunc, carLinkFunc){
continue;
}
- var template = document.getElementById("imgRadioTemplate--" + pageName).innerHTML;
+ // pageName에 따라 template이 다르다.
+ var template;
+ if (pageName == "sprt02020") {
+ template = document.getElementById("imgRadioTemplateTotalInfo--" + pageName).innerHTML;
+ } else {
+ template = document.getElementById("imgRadioTemplate--" + pageName).innerHTML;
+ }
+
template = template.replace(/{name}/gi, "existPhoto");
template = template.replace(/{value}/gi, item.FILE_ID);
template = template.replace(/{src}/gi, item.URL);
@@ -119,7 +126,7 @@ function settingPhotoMain(pageName, crdnIdElementId, carInfoFunc, carLinkFunc){
return tagsTextArr.join("");
}
-
+
//이미지 HTML 렌더링
$P.fnDisplay = () => {
@@ -135,7 +142,7 @@ function settingPhotoMain(pageName, crdnIdElementId, carInfoFunc, carLinkFunc){
};
-
+
//동영상캡쳐 콜백
$P.videoCallback = (snapshots) => {
snapshots.forEach(function(canvas, index, array){
@@ -145,10 +152,10 @@ function settingPhotoMain(pageName, crdnIdElementId, carInfoFunc, carLinkFunc){
file.id = "file-" + identify;
file.url = (window.URL || window.webkitURL).createObjectURL(file);
file.mosaic = "";
-
+
$P.localUploadArr.push(file);
if(index === array.length - 1){
-
+
$P.updateFileInfo("insert");
}
});
@@ -165,9 +172,9 @@ function settingPhotoMain(pageName, crdnIdElementId, carInfoFunc, carLinkFunc){
if(isNumberPlate){
modifiedFile.mosaic = "";
$P.localUploadArr.push(modifiedFile);
-
+
$P.updateFileInfo("insert");
-
+
} else {
$P.existFileArr.forEach(function(item,index){
if(item.FILE_ID == originalFileInfo.FILE_ID){
@@ -178,12 +185,12 @@ function settingPhotoMain(pageName, crdnIdElementId, carInfoFunc, carLinkFunc){
$P.existFileArr.splice(index, 1, modifiedFile);
};
});
-
+
$P.updateFileInfo("modifiy");
}
}
-
+
// 사진 저장
$P.updateFileInfo = (flag) => {
@@ -194,7 +201,7 @@ function settingPhotoMain(pageName, crdnIdElementId, carInfoFunc, carLinkFunc){
var fileProcessingURL = "";
if(flag == "insert"){
fileProcessingURL = wctx.url("file/insertCrdnImageFile.do");
-
+
formData.delete("newFileList");
if ($P.localUploadArr.length > 0) {
@@ -206,7 +213,7 @@ function settingPhotoMain(pageName, crdnIdElementId, carInfoFunc, carLinkFunc){
fileProcessingURL = wctx.url("file/updateCrdnImageFile.do");
formData.delete("modifyFile");
-
+
if($P.existFileArr.length > 0) {
$P.existFileArr.forEach(function(item){
if(item.status == "modified"){
@@ -216,11 +223,11 @@ function settingPhotoMain(pageName, crdnIdElementId, carInfoFunc, carLinkFunc){
}
});
}
-
-
+
+
} else if(flag == "delete"){
fileProcessingURL = wctx.url("file/deleteCrdnImageFile.do");
-
+
if($P.existFileArr.length > 0) {
$P.existFileArr.forEach(function(item){
if(item.status == "delete"){
@@ -230,24 +237,24 @@ function settingPhotoMain(pageName, crdnIdElementId, carInfoFunc, carLinkFunc){
}
} else if(flag == "changeOrder"){
fileProcessingURL = wctx.url("file/changeOrderCrdnImageFile.do");
-
+
var inputs = $("#dragAndDrop--"+pageName).find("input[name='existPhoto']");
for(var i=0; i < inputs.length; i++){
formData.append("orderedKeys", inputs[i].value);
}
}
-
+
ajax.post({
url : fileProcessingURL,
data : formData, contentType : false, processData : false,
success : resp => {
if(resp.saved){
-
+
var crdnId = $("#"+crdnIdElementId).val();
ajax.post({
url : wctx.url("file/list.do"),
- data : {
+ data : {
infoKeys : crdnId,
infoType : "100"
},
@@ -262,22 +269,22 @@ function settingPhotoMain(pageName, crdnIdElementId, carInfoFunc, carLinkFunc){
}
},
});
-
+
}
-
+
}
function initPhotoMain(pageName, fileList, existVideo){
-
+
var $P = pageObject[pageName];
-
+
//동영상캡쳐버튼
if(existVideo){
$("#btnOpenVideoCapture--"+pageName).show();
} else {
$("#btnOpenVideoCapture--"+pageName).hide();
}
-
+
$P.existFileArr = [];
if(fileList){
fileList.forEach(function(item){