개별총정보 - 개별반송 등록, 수정, 삭제 기능 수정.

main
jjh 12 months ago
parent 8bf5998219
commit 9161db0d7c

@ -97,6 +97,11 @@ public class SndngDtl extends AbstractEntity {
*/
private String dlvrTm;
/**
*
*/
private String undlvrRsnCd;
/**
*
*/

@ -61,11 +61,10 @@ public class Sndb01Controller extends ApplicationController {
, createSendingLink = "/080/createSndngLink.do" // 우편 통합 발송 연계 등록
, unitySendBackTargetMain = "/210/main.do" // 통합 반송 등록 메인
, getSendBackInfo = "/220/info.do" // 발송상세의 반송 정보 조회
, createSendBack = "/220/create.do" // 발송 상세의 반송 정보 등록
, updateSendBack = "/220/update.do" // 발송 상세의 반송 정보 수정
, deleteSendBack = "/220/delete.do" // 발송 상세의 반송 정보 삭제
, createSendBack = "/220/create.do" // 발송상세의 반송 등록
, updateSendBack = "/220/update.do" // 발송상세의 반송 수정
, deleteSendBack = "/210/delete.do" // 발송상세의 반송 삭제
, sendBackMain = "/230/main.do" // 반송 현황 메인 화면
, getSendBackList = "/230/list.do" // 반송 현황 목록 조회
@ -555,12 +554,12 @@ public class Sndb01Controller extends ApplicationController {
ModelAndView mav = new ModelAndView(json ? "jsonView" : "fims/sndb/sndb01220-info");
// View(jsp)에서 사용할 공통코드를 조회
Map<String, List<CommonCode>> commonCodes = getCodesOf("EGP010", "FIM054");
Map<String, List<CommonCode>> commonCodes = getCodesOf("FIM054", "FIM079");
return mav.addObject("pageName", "sndb01220")
.addObject("EGP010List", commonCodes.get("EGP010")) // 미배달 사유 코드(NONDELIVREASNCD)
.addObject("FIM054List", commonCodes.get("FIM054")) // 업무 구분 코드(TASK_SE_CD)
.addObject("callPurpose", req.getCallPurpose()) // 호출 용도
.addObject("FIM054List", commonCodes.get("FIM054")) // 업무 구분 코드(TASK_SE_CD)
.addObject("FIM079List", commonCodes.get("FIM079")) // 미배달 사유 코드(UNDLVR_RSN_CD)
.addObject("sndbkInfo", json ? sndbkInfo : toJson(sndbkInfo)) // 반송 정보
;
}

File diff suppressed because it is too large Load Diff

@ -129,10 +129,6 @@
});
}
/**************************************************************************
* Event
**************************************************************************/
/**************************************************************************
* 초기 셋팅
**************************************************************************/
@ -169,9 +165,9 @@
}
/**************************************************************************
* function
* 버튼 click Event
**************************************************************************/
// 저장
// 저장 버튼 클릭 이벤트
fnSave${pageName} = () => {
// validate 확인
if (!customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return;

@ -46,7 +46,7 @@
<th class="cmn" style="width: 120px;">발송일자</th>
<th class="cmn" style="width: 120px;">납기일자</th>
<th class="cmn" style="width: 200px;">납부자명</th>
<th class="cmn" style="width: 160px;">납부자번호</th>
<th class="cmn" style="width: 120px;">납부자번호</th>
<th class="cmn" style="width: 100px;">우편번호</th>
<th class="cmn" style="width: 280px;">주소</th>
<th class="cmn" style="width: 320px;">상세주소</th>
@ -73,7 +73,7 @@
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{SNDNG_YMD}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DUDT_YMD}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{RTPYR_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{RTPYR_NO}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{RTPYR_BRDT}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{RTPYR_ZIP}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{RTPYR_ADDR}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{RTPYR_DTL_ADDR}</td>

@ -61,7 +61,7 @@
<th class="cmn" style="width: 120px;">발송일자</th>
<th class="cmn" style="width: 120px;">납기일자</th>
<th class="cmn" style="width: 200px;">납부자명</th>
<th class="cmn" style="width: 160px;">납부자번호</th>
<th class="cmn" style="width: 120px;">납부자번호</th>
<th class="cmn" style="width: 100px;">우편번호</th>
<th class="cmn" style="width: 280px;">주소</th>
<th class="cmn" style="width: 320px;">상세주소</th>

@ -5,7 +5,7 @@
<div class="content-wrapper">
<!-- Content -->
<div class="container flex-grow-1 px-0">
<c:set var="prefixName" scope="request">의견제출 정보</c:set>
<c:set var="prefixName" scope="request">반송 정보</c:set>
<!-- Page Body -->
<div class="card">
@ -15,148 +15,33 @@
<input type="hidden" id="crdnId--${pageName}" name="crdnId" data-map="CRDN_ID" />
<input type="hidden" id="sggCd--${pageName}" name="sggCd" data-map="SGG_CD" />
<input type="hidden" id="taskSeCd--${pageName}" name="taskSeCd" data-map="TASK_SE_CD" />
<input type="hidden" id="opnnId--${pageName}" name="opnnId" data-map="OPNN_ID" />
<input type="hidden" id="sndngDtlId--${pageName}" name="sndngDtlId" data-map="SNDNG_DTL_ID" />
<div class="row g-1">
<!-- 차량번호 -->
<div class="col-md-4">
<label for="vhrno--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">차량번호</label>
<input type="text" class="form-control w-35" id="vhrno--${pageName}" name="vhrno" data-map="VHRNO" readonly />
</div>
<!-- 단속일시 -->
<div class="col-md-4">
<label for="crdnYmd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">단속일시</label>
<input type="text" class="form-control w-30" id="crdnYmd--${pageName}" name="crdnYmd" data-map="CRDN_YMD" readonly />
</div>
<!-- 납부자 명 -->
<div class="col-md-4">
<label for="rtpyrNm--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">납부자</label>
<input type="text" class="form-control w-55" id="rtpyrNm--${pageName}" name="rtpyrNm" data-map="RTPYR_NM" readonly />
</div>
<!-- 접수 번호 -->
<div class="col-md-4">
<label for="rcptNo--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">접수 번호</label>
<input type="text" class="form-control w-35" id="rcptNo--${pageName}" name="rcptNo" data-map="RCPT_NO" />
</div>
<!-- 접수 일자 -->
<div class="col-md-4">
<label for="rcptYmd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">접수 일자</label>
<input type="text" class="form-control form-date" id="rcptYmd--${pageName}" name="rcptYmd" data-map="RCPT_YMD"
data-fmt-type="day" title="날짜 선택" maxlength="10" required />
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</div>
<!-- 접수 구분 -->
<div class="col-md-4">
<label for="rcptSeCd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">접수 구분</label>
<select class="form-select" id="rcptSeCd--${pageName}" name="rcptSeCd" data-map="RCPT_SE_CD" required>
<option value="">선택하세요</option>
<c:forEach items="${FIM029List}" var="item">
<option value="${item.code}">${item.value}</option>
</c:forEach>
</select>
</div>
<!-- 진술자 이름 -->
<div class="col-md-4">
<label for="sttrNm--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">성명</label>
<input type="text" class="form-control w-40" id="sttrNm--${pageName}" name="sttrNm" data-map="STTR_NM" required />
<button type="button" class="btn btn-sm btn-outline-dark" id="btnPayer--${pageName}" title="납부자 정보 적용" onclick="fnPayer${pageName}();">
납부자
</button>
</div>
<!-- 진술자 생년월일 -->
<div class="col-md-4">
<label for="sttrBrdt--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">생년월일</label>
<input type="text" class="form-control w-25" id="sttrBrdt--${pageName}" name="sttrBrdt" data-map="STTR_BRDT" placeholder="YY-MM-DD" />
</div>
<!-- 소유주 관계 구분 코드 -->
<div class="col-md-4">
<label for="ownrRelCd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">소유주 관계 구분</label>
<select class="form-select" id="ownrRelCd--${pageName}" name="ownrRelCd" data-map="OWNR_REL_CD">
<option value="">선택하세요</option>
<c:forEach items="${FIM032List}" var="item">
<option value="${item.code}">${item.value}</option>
</c:forEach>
</select>
</div>
<!-- 진술자 주소 --><!-- 진술자 우편번호 -->
<div class="col-md-12">
<label for="sttrAddr--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">주소</label>
<input type="text" class="form-control w-75" id="sttrAddr--${pageName}" name="sttrAddr" data-map="STTR_ADDR" />
<input type="text" class="form-control w-px-75" id="sttrZip--${pageName}" name="sttrZip" data-map="STTR_ZIP" />
<button type="button" class="btn btn-sm btn-outline-dark" id="btnZip--${pageName}" title="우편번호 검색" onclick="fnZip${pageName}();">
검색
</button>
</div>
<!-- 진술자 상세주소 -->
<!-- 배달 일자 -->
<div class="col-md-12">
<label for="sttrDaddr--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">상세 주소</label>
<input type="text" class="form-control w-87" id="sttrDaddr--${pageName}" name="sttrDaddr" data-map="STTR_DADDR" />
</div>
<!-- 진술자 연락처 -->
<div class="col-md-4">
<label for="sttrCttpc--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">연락처</label>
<input type="text" class="form-control w-35" id="sttrCttpc--${pageName}" name="sttrCttpc" data-map="STTR_CTTPC" />
</div>
<!-- 진술자 이메일 -->
<div class="col-md-8">
<label for="sttrEml--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">이메일</label>
<input type="text" class="form-control w-35" id="sttrEml--${pageName}" name="sttrEml" data-map="STTR_EML" />
<label for="dlvrYmd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">배달일자</label>
<input type="text" class="form-control form-date" id="dlvrYmd--${pageName}" name="dlvrYmd" data-map="DLVR_YMD"
data-fmt-type="day" autocomplete="off" title="날짜 선택" maxlength="10" required />
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</div>
<!-- 의견 제출 내용 -->
<!-- 미배달 사유 -->
<div class="col-md-12">
<label for="opnnSbmsnCn--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">의견제출 내용</label>
<textarea type="text" class="form-control w-87" id="opnnSbmsnCn--${pageName}" name="opnnSbmsnCn" data-map="OPNN_SBMSN_CN" rows="5" data-maxlengthb="4000"></textarea>
</div>
<!-- 의견 제출 구분 코드 -->
<div class="col-md-4">
<label for="opnnSbmsnSeCd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">의견제출 구분</label>
<select class="form-select" id="opnnSbmsnSeCd--${pageName}" name="opnnSbmsnSeCd" data-map="OPNN_SBMSN_SE_CD" required>
<option value="">선택하세요</option>
<c:forEach items="${FIM033List}" var="item">
<label for="undlvrRsnCd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">미배달사유</label>
<select class="form-select" id="undlvrRsnCd--${pageName}" name="undlvrRsnCd" data-map="UNDLVR_RSN_CD" required>
<c:forEach items="${FIM079List}" var="item">
<option value="${item.code}">${item.value}</option>
</c:forEach>
</select>
</div>
<!-- 의견 제출 요지 -->
<div class="col-md-8">
<label for="opnnSbmsnGist--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">의견제출 요지</label>
<input type="text" class="form-control w-80" id="opnnSbmsnGist--${pageName}" name="opnnSbmsnGist" data-map="OPNN_SBMSN_GIST" data-maxlengthb="300" />
</div>
<!-- 담당자 검토 의견 -->
<!-- 미배달 사유 -->
<div class="col-md-12">
<label for="picRvwOpnn--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">검토 의견</label>
<textarea class="form-control w-87" id="picRvwOpnn--${pageName}" name="picRvwOpnn" data-map="PIC_RVW_OPNN" rows="3" data-maxlengthb="1000">
</textarea>
<label for="undlvrRsnNm--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">미배달기타사유</label>
<input type="text" class="form-control w-50" id="undlvrRsnNm--${pageName}" name="undlvrRsnNm" data-map="UNDLVR_RSN_NM" autocomplete="off" required />
</div>
</div>
</form>
<!-- /입력 영역 -->
<!-- 첨부 파일 -->
<div class="card">
<form id="frmFile--${pageName}" method="post" enctype="multipart/form-data" >
<input type="file" id="uploadFiles--${pageName}" name="uploadFiles" multiple="multiple" onchange="fnAddFiles(this);" hidden />
</form>
<div class="row g-1">
<div class="col-md-12">
<button type="button" class="btn btn-blue" id="btnAddFile--${pageName}" title="첨부파일 추가">파일 추가</button>
</div>
</div>
<!-- 첨부 파일 테이블 -->
<div class="table-responsive">
<table class="table table-bordered table-hover table-striped" id="fileList--${pageName}">
<thead>
<th class="text-center" style="width: 24px">NO.</th>
<th class="text-center" style="width: 200px">파일 번호</th>
<th class="text-center">파일 이름</th>
<th class="text-center" style="width: 200px">파일 크기</th>
<th class="text-center" style="width: 120px">다운로드</th>
<th class="text-center" style="width: 120px">삭제</th>
</thead>
<tbody></tbody>
</table>
</div> <!-- 첨부 파일 테이블 <div class="table-responsive"> -->
</div> <!-- 첨부 파일 <div class="card"> -->
</div> <!-- <div class="card"> -->
<!-- 업무 버튼 표시 -->
@ -178,7 +63,7 @@
* Global Variable
**************************************************************************/
// URL
var ${pageName}PrefixUrl = "/excl/excl02";
var ${pageName}PrefixUrl = "/sndb/sndb01";
// FormFields
var ${pageName}Fields = new FimsFormFields("#frmEdit--${pageName}");
@ -186,31 +71,26 @@
* DatasetControl
**************************************************************************/
var ${pageName}Control = new DatasetControl({
prefix : "opnn"
, prefixName : "의견제출"
, keymapper : info => info ? info.OPNN_ID : ""
, dataGetter : obj => obj.opnnSbmsnInfo
, formats : {
CRDN_YMD : dateFormat
, RCPT_YMD : dateFormat
}
prefix : "sndbkInfo"
, prefixName : "반송"
, keymapper : info => info ? info.SNDNG_DTL_ID : ""
, dataGetter : obj => obj.sndbkInfo
});
${pageName}Control.onCurrentChange = item => {
if (!item) return;
// Dataset 셋팅
${pageName}Fields.set(item);
// 업무구분에 따른 url 변경
${pageName}Control.urls.create = wctx.url(item.data.TASK_SE_CD + ${pageName}PrefixUrl + "/020/create.do");
${pageName}Control.urls.update = wctx.url(item.data.TASK_SE_CD + ${pageName}PrefixUrl + "/020/update.do");
if (${pageName}CallPurpose == "create") {
$("#rcptNo--${pageName}").prop("readonly", true);
setForm${pageName}(); // 화면 초기화
} else {
fnSearchFileList${pageName}(item.data.OPNN_ID); // 첨부파일 조회
// 배달일자
if ($("#dlvrYmd--${pageName}").val() == "") {
$("#dlvrYmd--${pageName}").datepicker("setDate", new Date());
}
// 업무구분에 따른 url 변경
${pageName}Control.urls.create = wctx.url(item.data.TASK_SE_CD + ${pageName}PrefixUrl + "/220/create.do");
${pageName}Control.urls.update = wctx.url(item.data.TASK_SE_CD + ${pageName}PrefixUrl + "/220/update.do");
}
/**************************************************************************
@ -224,9 +104,6 @@
dialog.alert(showMessage);
if (resp.saved) {
// 폼을 리셋해서 uploadFiles에 출력된 선택 파일을 초기화시킨다.
document.getElementById("frmFile--${pageName}").reset();
dialog.close(${pageName}Control.prefix + "Dialog");
}
}
@ -235,25 +112,11 @@
${pageName}Control.save = (info) => {
if (!info) return;
let formData = new FormData();
let create = isEmpty(info.opnnId);
// 첨부파일 배열에 있는 내용을 등록
for (let iLoop = 0; iLoop < $fileListArr.length; iLoop++) {
formData.append("uploadFiles" , $fileListArr[iLoop]);
}
for (let key in info) {
let value = info[key];
formData.append(key, value);
}
let create = isEmpty(info.sndngDtlId);
ajax.post({
url : !create ? ${pageName}Control.urls.update : ${pageName}Control.urls.create
, data : formData
, contentType : false
, processData : false
, data : info
, success : resp => ${pageName}Control.onSave(resp)
});
}
@ -276,19 +139,40 @@
});
});
$("#btnAddFile--${pageName}").on('click', () => { $("#uploadFiles--${pageName}").trigger("click"); });
$("#undlvrRsnCd--${pageName}").change(function() {
if ($("#undlvrRsnCd--${pageName}").val() == "00") {
$("#undlvrRsnNm--${pageName}").prop("readonly", false);
$("#undlvrRsnNm--${pageName}").val("");
} else {
$("#undlvrRsnNm--${pageName}").prop("readonly", true);
$("#undlvrRsnNm--${pageName}").val($("#undlvrRsnCd--${pageName} option:selected").text());
}
});
}
// 화면 초기값 셋팅
setForm${pageName} = () => {
// 달력 초기화
initDatepicker("frmEdit--${pageName}");
$("#rcptYmd--${pageName}").datepicker("setDate", new Date());
$("#dlvrYmd--${pageName}").datepicker("setDate", new Date());
}
/**************************************************************************
* 버튼 click Event
**************************************************************************/
// 저장 버튼 클릭 이벤트
fnSave${pageName} = () => {
// validate 확인
if (!customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return;
dialog.alert({
content : "현재 " + ${pageName}Control.prefixName + " 정보를 저장하시겠습니까?"
, onOK : () => {
${pageName}Control.save(${pageName}Fields.get());
}
});
}
/**************************************************************************
* script 진입
@ -297,7 +181,13 @@
// 이벤트 설정
setEvent${pageName}();
${pageName}Control.setData([${opnnSbmsnInfo}]); // Dataset 셋팅 - 단건일 경우 setData
// 화면 초기 설정
setForm${pageName}();
${pageName}Control.setData([${sndbkInfo}]);
// 미배달 사유 변경 이벤트
$("#undlvrRsnCd--${pageName}").trigger("change");
});
</script>

@ -360,7 +360,7 @@
params.sndngDtlSttsCd = "03"; // 발송 상세 상태 코드(SNDNG_DTL_STTS_CD) FIM050 - 03 발송
ajax.post({
url : wctx.url(params.taskSeCd + "/sndb/sndb01/220/delete.do")
url : wctx.url(params.taskSeCd + "/sndb/sndb01/210/delete.do")
, data : params
, success : resp => ${pageName}CallbackRemoveSndbk(resp)
});
@ -382,7 +382,7 @@
};
ajax.get({
url : wctx.url(taskSeCd + "/sprt/sprt02/040/info.do")
url : wctx.url(params.taskSeCd + "/sprt/sprt02/040/info.do")
, headers: { Accept: "application/json; charset=utf-8" } // json
, data : params || {}
, success : resp => {

Loading…
Cancel
Save