fix : 맾빙시 라디오버튼 값 가져오는 부분 변경.

dev
Leeyh1121 5 months ago
parent c358729268
commit fc80b08e93

@ -131,7 +131,6 @@
</div> <!-- <div class="card"> -->
<div class="card col-6">
<label class="form-label fw-bold form-search-title" for="Rslt--${pageName}">결과 정보</label>
<input type="hidden" id="setUsrRptIdNo--${pageName}" name="setUsrRptIdNo" />
<div class="card-datatable text-nowrap">
<div class="dataTables_wrapper dt-bootstrap5 no-footer" id="DataTables_Table_1_wrapper--${pageName}">
<div class="table-responsive ox-scroll oy-scroll h-px-250" id="table-responsive-1--${pageName}">
@ -161,7 +160,7 @@
<template id="${infoPrefix}Row--${pageName}Mapping">
<tr data-key="{orgUsrRptIdNo}">
<td class="text-center">
<input type="radio" class="form-check-input" name="maapingCheck" value="{dscdmngId}" alt="맵핑체크" onchange="{onchange}">
<input type="radio" class="form-check-input" name="maapingCheck" value="{dscdmngId}" data-value="{orgUsrRptIdNo}" alt="맵핑체크" onchange="{onchange}">
</td>
<%-- <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dscdmngId}</td>--%>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{bsshNm}</td>
@ -396,11 +395,11 @@
// 저장
$P.control.save = () => {
// FIXME: 확인
alert("저장 row : "+JSON.stringify($P.mappingControl.dataset.getCurrent()));
// if(!$P.mappingControl.dataset.getCurrent().usrRptIdNo){
// dialog.alert("선택된 NIMS 폐기 보고 데이타가 없습니다");
// return false;
// }
//alert("저장 row : "+JSON.stringify($P.mappingControl.dataset.getCurrent()));
if(!$P.mappingControl.dataset.getCurrent().orgUsrRptIdNo){
dialog.alert("선택된 NIMS 폐기 보고 데이타가 없습니다");
return false;
}
ajax.post({
@ -459,7 +458,7 @@
document.getElementById("${infoPrefix}Row--${pageName}Mapping").innerHTML, <%-- from template#${infoPrefix}Row --%>
(str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].mappingControl.setCurrent('" + dataItem.getValue("usrRptIdNo") + "');")
.replace(/{onchange}/gi, "pageObject['${pageName}'].radioClick('" + dataItem.getValue("usrRptIdNo") + "');")
.replace(/{onchange}/gi, "pageObject['${pageName}'].radioClick('" + dataItem.getValue("orgUsrRptIdNo") + "');")
);
$("#tbody--${pageName}Mapping").html(trs.join());
@ -497,7 +496,6 @@
if(col0val != "" && col0val != null){
col0.prop("checked",true);
}
});
}
/**************************************************************************
@ -515,15 +513,14 @@
**************************************************************************/
// 저장
$P.fnSave = () => {
let checkData = $("#setUsrRptIdNo--${pageName}").val();
// FIXME: 확인
alert('checkData : ' + checkData);
let checkData = $("input[name='maapingCheck']:checked").parent().parent().data().key;
//alert('checkData : ' + checkData);
//$P.mappingControl.setCurrent(checkData);
// FIXME: 확인
$P.mappingControl.setCurrent(checkData);
const row = $P.mappingControl.getCurrent();
// FIXME: 확인
alert('row data : ' + JSON.stringify(row));
//alert('row data : ' + JSON.stringify(row));
dialog.alert({
content: "현재 선택에 체크 된 폐기 보고 확인 정보를 저장하시겠습니까?"

Loading…
Cancel
Save