|
|
|
@ -1,20 +1,21 @@
|
|
|
|
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
|
|
|
|
|
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
|
|
|
|
|
|
|
|
|
|
<c:set var="prefixName" scope="request">반송 정보</c:set>
|
|
|
|
|
|
|
|
|
|
<!-- inner page html -->
|
|
|
|
|
<div class="content-pop">
|
|
|
|
|
<!-- Content -->
|
|
|
|
|
<div class="container flex-grow-1 px-0">
|
|
|
|
|
<c:set var="prefixName" scope="request">반송 정보</c:set>
|
|
|
|
|
|
|
|
|
|
<!-- Page Body -->
|
|
|
|
|
<div class="card">
|
|
|
|
|
<!-- 입력 영역 -->
|
|
|
|
|
<form id="frmEdit--${pageName}" name="frmEdit">
|
|
|
|
|
<!-- hidden -->
|
|
|
|
|
<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="crdnId--${pageName}" name="crdnId" data-map="CRDN_ID" />
|
|
|
|
|
<input type="hidden" id="sndngDtlId--${pageName}" name="sndngDtlId" data-map="SNDNG_DTL_ID" />
|
|
|
|
|
|
|
|
|
|
<div class="row g-1">
|
|
|
|
@ -41,21 +42,24 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
<!-- /입력 영역 -->
|
|
|
|
|
</div> <!-- <div class="card"> -->
|
|
|
|
|
<!-- 입력 영역 -->
|
|
|
|
|
|
|
|
|
|
<!-- 업무 버튼 표시 -->
|
|
|
|
|
<div>
|
|
|
|
|
<span class="container-page-btn">
|
|
|
|
|
<span class="container-window-btn-right">
|
|
|
|
|
<!-- 업무 버튼 및 건수 표시 -->
|
|
|
|
|
<div>
|
|
|
|
|
<span class="container-page-btn">
|
|
|
|
|
<!-- 업무 버튼 -->
|
|
|
|
|
<button type="button" class="btn btn-primary w-px-80" id="btnSave--${pageName}" title="저장">저장</button>
|
|
|
|
|
<span class="container-window-btn-right">
|
|
|
|
|
<button type="button" class="btn btn-primary w-px-80" id="btnSave--${pageName}" title="저장">
|
|
|
|
|
저장
|
|
|
|
|
</button>
|
|
|
|
|
</span>
|
|
|
|
|
</span>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- / 업무 버튼 표시 -->
|
|
|
|
|
</div> <!-- 업무 버튼 및 건수 표시 -->
|
|
|
|
|
</div> <!-- <div class="card"> -->
|
|
|
|
|
<!-- Page Body -->
|
|
|
|
|
|
|
|
|
|
</div> <!-- / Content <div class="container flex-grow-1 px-0"> -->
|
|
|
|
|
</div> <!-- <div class="container flex-grow-1 px-0"> -->
|
|
|
|
|
<!-- Content -->
|
|
|
|
|
</div> <!-- / inner page html <div class="content-pop"> -->
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
@ -69,10 +73,8 @@
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
// pageObject
|
|
|
|
|
var $P = pageObject["${pageName}"];
|
|
|
|
|
let $P = pageObject["${pageName}"];
|
|
|
|
|
|
|
|
|
|
// URL
|
|
|
|
|
$P.PrefixUrl = "/sndb/sndb01";
|
|
|
|
|
// infoDialog 호출 용도(view 조회(편집불가), create 등록, update 수정)
|
|
|
|
|
$P.callPurpose = "${callPurpose}";
|
|
|
|
|
// FormFields
|
|
|
|
@ -82,10 +84,10 @@
|
|
|
|
|
* DatasetControl
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$P.control = new DatasetControl({
|
|
|
|
|
prefix : "sndbk"
|
|
|
|
|
, prefixName : "반송"
|
|
|
|
|
, keymapper : info => info ? info.SNDNG_DTL_ID : ""
|
|
|
|
|
, dataGetter : obj => obj.sndbkInfo
|
|
|
|
|
prefix: "sndbk"
|
|
|
|
|
, prefixName: "반송"
|
|
|
|
|
, keymapper: info => info ? info.SNDNG_DTL_ID : ""
|
|
|
|
|
, dataGetter: obj => obj.sndbkInfo
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
@ -95,10 +97,10 @@
|
|
|
|
|
if (!item) return;
|
|
|
|
|
|
|
|
|
|
// Dataset 셋팅
|
|
|
|
|
$P.formFields.set($P.control,item);
|
|
|
|
|
$P.formFields.set($P.control, item);
|
|
|
|
|
|
|
|
|
|
// 업무구분에 따른 URL 변경
|
|
|
|
|
$P.setURL(item.data.TASK_SE_CD);
|
|
|
|
|
$P.fnSetURL(item.data.TASK_SE_CD);
|
|
|
|
|
|
|
|
|
|
// 호출용도가 등록 이라면..
|
|
|
|
|
if ($P.callPurpose == "create") {
|
|
|
|
@ -112,16 +114,17 @@
|
|
|
|
|
|
|
|
|
|
// 저장 callback
|
|
|
|
|
$P.control.onSave = (resp) => {
|
|
|
|
|
let dialogTitle = $("#" + $P.control.prefix + "Dialog").find("h5.modal-title").html();
|
|
|
|
|
let dialogTitle = $("#" + $P.control.prefix + "Dialog--${openerPageName}").find("h5.modal-title").html();
|
|
|
|
|
let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, dialogTitle);
|
|
|
|
|
|
|
|
|
|
dialog.alert({
|
|
|
|
|
content : showMessage
|
|
|
|
|
, onOK : () => { }
|
|
|
|
|
content: showMessage
|
|
|
|
|
, init: () => { setDialogZindex(); }
|
|
|
|
|
, onOK: () => { }
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (resp.saved) {
|
|
|
|
|
dialog.close($P.control.prefix + "Dialog");
|
|
|
|
|
dialog.close($P.control.prefix + "Dialog--${openerPageName}");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -132,28 +135,37 @@
|
|
|
|
|
let create = ($P.callPurpose == "create");
|
|
|
|
|
|
|
|
|
|
ajax.post({
|
|
|
|
|
url : !create ? $P.control.urls.update : $P.control.urls.create
|
|
|
|
|
, data : info
|
|
|
|
|
, success : resp => $P.control.onSave(resp)
|
|
|
|
|
url: !create ? $P.control.urls.update : $P.control.urls.create
|
|
|
|
|
, data: info || {}
|
|
|
|
|
, success: resp => $P.control.onSave(resp)
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* 사용자 함수(function)
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
// 업무구분에 따른 URL 설정
|
|
|
|
|
$P.fnSetURL = (taskSeCd) => {
|
|
|
|
|
$P.control.urls.create = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/230/create.do");
|
|
|
|
|
$P.control.urls.update = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/230/update.do");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* 버튼 clickEvent
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
// 저장 버튼 클릭 이벤트
|
|
|
|
|
$P.fnSave = (title) => {
|
|
|
|
|
$P.fnSave = () => {
|
|
|
|
|
// validate 확인
|
|
|
|
|
if (!customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return;
|
|
|
|
|
|
|
|
|
|
// 파리미터 설정
|
|
|
|
|
let params = $P.formFields.get(); // formFields
|
|
|
|
|
params.title = title; // 타이틀
|
|
|
|
|
params.sndngDtlSttsCd = "05"; // FIM050 - 05 반송
|
|
|
|
|
let params = $P.formFields.get(); // formFields
|
|
|
|
|
params.sndngDtlSttsCd = "05"; // FIM050 - 05 반송
|
|
|
|
|
|
|
|
|
|
dialog.alert({
|
|
|
|
|
content : "현재 " + $P.control.prefixName + " 정보를 저장하시겠습니까?"
|
|
|
|
|
, onOK : () => {
|
|
|
|
|
content: "현재 " + $P.control.prefixName + " 정보를 저장하시겠습니까?"
|
|
|
|
|
, init: () => { setDialogZindex(); }
|
|
|
|
|
, onOK: () => {
|
|
|
|
|
$P.control.save(params);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
@ -186,10 +198,8 @@
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 저장 버튼 이벤트
|
|
|
|
|
$("#btnSave--${pageName}").on("click", function() {
|
|
|
|
|
$P.fnSave($(this).attr("title"));
|
|
|
|
|
});
|
|
|
|
|
// 버튼 이벤트
|
|
|
|
|
$("#btnSave--${pageName}").on("click", () => $P.fnSave()); // 저장
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 초기 화면 설정
|
|
|
|
@ -206,12 +216,6 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 업무구분에 따른 URL 설정
|
|
|
|
|
$P.setURL = (taskSeCd) => {
|
|
|
|
|
$P.control.urls.create = wctx.url("/" + taskSeCd + $P.PrefixUrl + "/230/create.do");
|
|
|
|
|
$P.control.urls.update = wctx.url("/" + taskSeCd + $P.PrefixUrl + "/230/update.do");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* 최초 실행 함수
|
|
|
|
|
**************************************************************************/
|
|
|
|
|