diff --git a/src/main/java/cokr/xit/fims/crdn/web/Crdn01Controller.java b/src/main/java/cokr/xit/fims/crdn/web/Crdn01Controller.java index 65004ae4..b033ce97 100644 --- a/src/main/java/cokr/xit/fims/crdn/web/Crdn01Controller.java +++ b/src/main/java/cokr/xit/fims/crdn/web/Crdn01Controller.java @@ -4,6 +4,7 @@ import java.util.List; import java.util.Map; import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; @@ -75,11 +76,14 @@ public class Crdn01Controller extends ApplicationController { * @return fims/crdn/crdn01050-info */ @RequestMapping(name="민원내역 원본 보기", value="/050/info.do") - public ModelAndView getCivilComplaintOriginalInfo(CrdnQuery req) { + public ModelAndView getCivilComplaintOriginalInfo(CrdnQuery req, HttpServletRequest request) { boolean json = jsonResponse(); + ModelAndView mav = new ModelAndView(json ? "jsonView" : "fims/crdn/crdn01050-info"); mav.addObject("pageName", "crdn01050-info"); + String urlTaskSeCd = request.getServletPath().split("/")[1]; + mav.addObject("taskSeCd", urlTaskSeCd); Map> commonCodes = getCodesOf("FIM039"); mav.addObject("FIM039List", commonCodes.get("FIM039")); diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01010-main.jsp index 530cf77b..ecbfd262 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01010-main.jsp @@ -386,16 +386,59 @@ $(document).ready(function(){ var taskSeCd = $("#frmSearch--${pageName} input[name='taskSeCd']:checked").val(); + var dialogId = "cvlcptOrgnlDialog--${pageName}"; ajax.get({ url : wctx.url("/"+taskSeCd+"/crdn/crdn01/050/info.do"), data : { crdnId : cur["CRDN_ID"] }, success : resp => { dialog.open({ - id : "cvlcptOrgnlDialog--${pageName}" - , title : "민원내역 원본" - , content : resp - , size : "xl" - , init : () => {} + id : dialogId, + title : "민원내역 원본", + content : resp, + size : "xl", + init : () => { + var parentRes = new Object(); + var childReq = pageObject.childReq.pop(); + + for(var reqKey in childReq) { + if(reqKey == "getCountStatus"){ + parentRes[reqKey] = function(currentKey){ + var ds = $P.crdnControl.dataset.getDataset(); + var index = ds.findIndex(item => item.CRDN_ID == currentKey); + return (index+1) + " of " + ds.length; + }; + } + if(reqKey == "getNextKey"){ + parentRes[reqKey] = function(currentKey){ + var ds = $P.crdnControl.dataset.getDataset(); + var index = ds.findIndex(item => item.CRDN_ID == currentKey); + if(ds.length > index+1){ + return ds[index+1]["CRDN_ID"]; + } else { + return ""; + } + }; + } + if(reqKey == "getPrevKey"){ + parentRes[reqKey] = function(currentKey){ + var ds = $P.crdnControl.dataset.getDataset(); + var index = ds.findIndex(item => item.CRDN_ID == currentKey); + if(index != 0 && ds.length > 1){ + return ds[index-1]["CRDN_ID"]; + } else { + return ""; + } + }; + } + if(reqKey == "selectRow"){ + parentRes[reqKey] = function(currentKey){ + $P.clickCrdnList(currentKey); + }; + } + } + + pageObject.parentRes.push(parentRes); + } }); } }); diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01050-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01050-info.jsp index e1423b8e..1d247ca4 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01050-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01050-info.jsp @@ -59,41 +59,107 @@ +
+ + + +
\ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/index.jsp b/src/main/webapp/WEB-INF/jsp/index.jsp index aecc465b..9f7555a7 100644 --- a/src/main/webapp/WEB-INF/jsp/index.jsp +++ b/src/main/webapp/WEB-INF/jsp/index.jsp @@ -41,6 +41,8 @@