fix: 폐기보고 확인된 데이타 조회 처리 추가

dev
Jonguk. Lim 5 months ago
parent 6f3debc3c1
commit 6ec2698e22

@ -75,4 +75,5 @@ public class DsuseMappingInfo {
private String dsuseSeCd;
private String dsuseMthCd;
private String dsuseLoc;
private String prgrsSttsCd;
}

@ -13,6 +13,7 @@
<!-- 입력 영역 -->
<form id="frmEdit--${pageName}" name="frmEdit">
<!-- hidden -->
<input type="hidden" name="prgrsSttsCd" data-map="prgrsSttsCd" />
<input type="hidden" name="dscdmngId" data-map="dscdmngId" />
<label class="form-label fw-bold form-search-title" for="Rslt--${pageName}" style="margin-top: 10px; padding-left: 20px;">신청 정보</label>
<div class="row my-1 mx-4 g-1 border-card rounded-3">
@ -395,27 +396,8 @@
$("#tbody--${pageName}MappingDtl").setCurrentRow(key);
}
/*
// 저장 callback
$P.control.onSave = (resp) => {
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
, init: () => { setDialogZindex(); }
, onOK: () => { }
});
if (resp.saved) {
dialog.close($P.control.prefix + "Dialog--${openerPageName}");
}
} */
// 저장
$P.control.save = () => {
// debugger;
ajax.post({
url: '<c:url value="${apiHost}/api/biz/nims/v1/modifyMappingDsuseMgt"/>'
, data: JSON.stringify({
@ -529,9 +511,6 @@
**************************************************************************/
// 저장
$P.fnSave = () => {
// validate 확인
//if (!customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return;
//let checkData = $("input[name='maapingCheck']:checked").val();
let checkData = $("#setUsrRptIdNo--${pageName}").val();
$P.mappingControl.setCurrent(checkData);
const row = $P.mappingControl.getCurrent();
@ -561,11 +540,6 @@
// 초기 화면 설정
$P.initForm = () => {
// fnMakeScrollableTable($("#table-responsive-0--${pageName}")[0], $P.scrollDataList);
// fnMakeScrollableTable($("#table-responsive-1--${pageName}")[0], $P.scrollDataList);
// fnMakeScrollableTable($("#table-responsive-2--${pageName}")[0], $P.scrollDataList);
// Dialog 마우스로 드래그 할 수 있도록 설정.
//fnMakeDraggableDialog(document.getElementById($P.control.prefix + "Dialog"));
}
@ -580,7 +554,14 @@
// 3. Dataset 설정
$P.control.setData([${dsuseMappingInfo}]);
// $P.productControl.setData([${dsuseMappingInfo}]);
// NIMS 보고 완료 확인인 경우 저장 버튼 숨김
if($P.control.getCurrent().prgrsSttsCd == "99"){
$("#btnSave--${pageName}").hide();
}else{
$("#btnSave--${pageName}").show();
}
});
</script>

@ -91,6 +91,7 @@
<th class="cmn" style="width: 230.469px;">업체명</th>
<th class="cmn" style="width: 100px;">보고건수</th>
<th class="cmn" style="width: 230.469px;">처리상태</th>
<th class="cmn" style="width: 270.469px;">NIMS보고ID</th>
<th class="cmn" style="width: 180px;">폐기구분</th>
<th class="cmn" style="width: 230.469px;">폐기사유</th>
<th class="cmn" style="width: 180px;">폐기방법</th>
@ -108,6 +109,9 @@
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{BSSH_NM}</td>
<td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{RND_DTL_RPT_CNT}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{PRGRS_STTS_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">
<a href="#">{USR_RPT_ID_NO}</a>
</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_SE_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_PRV_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_MTH_NM}</td>
@ -221,11 +225,7 @@
$P.detailControl = new DatasetControl({
urls : {
load : wctx.url("/adds/nims/dsuseMgtDetail-list.do")
// FIXME: POST로 변경
//load : '<c:url value="${apiHost}/api/biz/nims/v1/getDsuseMgts" />'
}
// , query.schDscdmngId : $P.control.getValue("DSCDMNG_ID")
// , data : {"schDscdmngId" : $P.control.getValue("DSCDMNG_ID")}
, prefix : "dsuseMgtDetail"
, prefixName : "신청서접수상세"
, keymapper : info => info ? info.DSCDMNG_SN : ""
@ -285,10 +285,33 @@
// 맵핑 dialog
$P.control.getInfo = (gdccId) => {
let dialogTitle = "폐기 보고 확인 등록";
$P.control.getInfo = (dscdmngId, isConfirm) => {
let dialogTitle = "NIMS 폐기 보고 확인 등록";
let row = $P.control.dataset.getCurrent();
if (typeof row == "undefined" || row == null || row == "") return;
// 그리드 더블클릭시 - NIMS 보고 완료 미 처리된 데이타인 경우
if(isConfirm){
$P.control.setCurrent(dscdmngId);
row = $P.control.dataset.getCurrent();
if(!row.USR_RPT_ID_NO) return false;
if(row.PRGRS_STTS_CD != "99") {
dialog.alert('NIMS 보고 완료 처리 되지 않은 데이타 입니다');
return false;
}
}
// 처리상태가 완료인 경우
if(row.PRGRS_STTS_CD == "99") {
dialogTitle = "NIMS 폐기 보고 완료 확인";
// NIMS폐기보고확인 버튼 클릭시 - 보고 완료 처리된 데이타인 경우 매핑 조회 불가
if(!isConfirm) {
dialog.alert('NIMS 보고 완료 처리된 데이타 입니다');
return false;
}
}
let params = {
dscdmngId: row.DSCDMNG_ID,
bsshNm: row.BSSH_NM,
@ -302,7 +325,8 @@
dsusePrvCd: row.DSUSE_PRV_CD,
dsuseSeCd: row.DSUSE_SE_CD,
dsuseMthCd: row.DSUSE_MTH_CD,
dsuseLoc: row.DSUSE_LOC
dsuseLoc: row.DSUSE_LOC,
prgrsSttsCd: row.PRGRS_STTS_CD
};
ajax.get({
@ -374,8 +398,8 @@
//
let replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].control.setCurrent('" + dataItem.getValue("DSCDMNG_ID") + "');");
// .replace(/{ondblclick}/gi, "pageObject['${pageName}'].getTotalInfo('" + dataItem.getValue("CRDN_ID") + "');");
.replace(/{onclick}/gi, "pageObject['${pageName}'].control.setCurrent('" + dataItem.getValue("DSCDMNG_ID") + "');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].control.getInfo('" + dataItem.getValue("DSCDMNG_ID") + "'," + true + ");");
let trs = empty ? [document.getElementById("${infoPrefix}NotFound--${pageName}").content.outerHTML]
: ${infoPrefix}List.inStrings(foundTr.outerHTML, replacer);

Loading…
Cancel
Save