납부자번호 복사 기능 추가

main
이범준 1 year ago
parent e8a91b2b81
commit 46497805ac

@ -11,6 +11,14 @@
<jsp:include page="/WEB-INF/jsp/fims/sprt/sprt01040-info.jsp" />
</div>
</div>
<div class="toast-container position-fixed bottom-0 end-0 p-3">
<div id="divToast--${pageName}" class="toast" role="alert" aria-live="assertive" aria-atomic="true">
<div id="toastText--${pageName}" class="toast-body bg-black text-white">
</div>
</div>
</div>
<jsp:include page="/WEB-INF/jsp/include/bottom.jsp" />
<div class="content-backdrop fade"></div>
</div>
@ -111,6 +119,69 @@ integrationSearchControl.downdataset.onSelectionChange = (selected) => {
**************************************************************************/
var integrationSearch = {};
integrationSearch.toast = new bootstrap.Toast(document.getElementById('divToast--${pageName}'), {
animation: true,
autohide: true,
delay: 2000
});
// 검색 조건 파라미터 가져오기
integrationSearch.getParams = () => {
var formFields = new FimsFormFields("#frmSearch--${pageName}");
var formData = formFields.get();
return formData;
}
// 초기화
integrationSearch.fnReset = () => {
integrationSearchControl.updataset.clear();
integrationSearchControl.downdataset.clear();
}
// 검색
integrationSearch.fnSearchList = () => {
// 검색조건
integrationSearchControl.query = integrationSearch.getParams();
var query = integrationSearchControl.query;
var minKeyword = false;
var keys = Object.keys(query);
for(var i=0; i < keys.length; i++){
var key = keys[i];
if(!key.startsWith("isch")){
continue;
}
if(key.startsWith("ischOnlyData") || key.startsWith("ischExclData") || key.startsWith("ischInclData")
|| key.endsWith("Similar")){
continue;
}
var value = query[key];
if(value != null && value != ""){
minKeyword = true;
break;
}
}
if(!minKeyword){
dialog.alert("검색조건을 입력하세요.");
return;
}
$("#upGridTabs--${pageName}").find("button").not(":eq(0)").removeClass("active");
$("#upGridTabs--${pageName}").find("button").eq(0).addClass("active");
$("#downGridTabs--${pageName}").find("button").not(":eq(0)").removeClass("active");
$("#downGridTabs--${pageName}").find("button").eq(0).addClass("active");
integrationSearchControl.updataset.clear();
integrationSearchControl.downdataset.clear();
integrationSearchControl.load();
}
integrationSearch.renderList = (updown, tabGroup) => {
var tbody = updown == "up" ? "upTbody--${pageName}" : "downTbody--${pageName}";
@ -165,70 +236,26 @@ integrationSearch.renderList = (updown, tabGroup) => {
fn_securityModeToggle($("#securityMode--top").is(":checked"));
}
integrationSearch.setCurrent = () => {
console.log(1);
}
// 검색 조건 파라미터 가져오기
integrationSearch.getParams = () => {
var formFields = new FimsFormFields("#frmSearch--${pageName}");
var formData = formFields.get();
return formData;
}
// 초기화
integrationSearch.fnReset = () => {
integrationSearchControl.updataset.clear();
integrationSearchControl.downdataset.clear();
}
// 검색
integrationSearch.fnSearchList = () => {
// 검색조건
integrationSearchControl.query = integrationSearch.getParams();
var query = integrationSearchControl.query;
var minKeyword = false;
var keys = Object.keys(query);
for(var i=0; i < keys.length; i++){
var key = keys[i];
if(!key.startsWith("isch")){
continue;
}
if(key.startsWith("ischOnlyData") || key.startsWith("ischExclData") || key.startsWith("ischInclData")
|| key.endsWith("Similar")){
continue;
}
// 엑셀
integrationSearch.fnExcel = (updown) => {
var value = query[key];
if(value != null && value != ""){
minKeyword = true;
break;
}
}
if(!minKeyword){
dialog.alert("검색조건을 입력하세요.");
return;
//납부자번호 복사
integrationSearch.fnCopyPyrNo = (updown) => {
var cur;
if(updown == "up"){
cur = integrationSearchControl.updataset.getCurrent();
} else {
cur = integrationSearchControl.downdataset.getCurrent();
}
$("#upGridTabs--${pageName}").find("button").not(":eq(0)").removeClass("active");
$("#upGridTabs--${pageName}").find("button").eq(0).addClass("active");
$("#downGridTabs--${pageName}").find("button").not(":eq(0)").removeClass("active");
$("#downGridTabs--${pageName}").find("button").eq(0).addClass("active");
integrationSearchControl.updataset.clear();
integrationSearchControl.downdataset.clear();
integrationSearchControl.load();
if(cur != null){
navigator.clipboard.writeText(cur.RTPYR_NO);
$("#toastText--${pageName}").html("납부자번호가 복사되었습니다.");
integrationSearch.toast.show();
}
// 엑셀
integrationSearch.fnExcel = () => {
}
//개별총정보 dialog
@ -269,9 +296,11 @@ integrationSearch.setEvent = () => {
$("#btnReset--${pageName}").on("click", function(){ integrationSearch.fnReset(); });
$("#btnSearch--${pageName}").on("click", function(){ integrationSearch.fnSearchList(); });
$("#btnUpExcel--${pageName}").on("click", function(){ integrationSearch.fnExcel(); });
$("#btnDownExcel--${pageName}").on("click", function(){ integrationSearch.fnExcel(); });
$("#btnUpExcel--${pageName}").on("click", function(){ integrationSearch.fnExcel("up"); });
$("#btnDownExcel--${pageName}").on("click", function(){ integrationSearch.fnExcel("down"); });
$("#btnUpCopyPyrNo--${pageName}").on("click", function(){ integrationSearch.fnCopyPyrNo("up"); });
$("#btnDownCopyPyrNo--${pageName}").on("click", function(){ integrationSearch.fnCopyPyrNo("down"); });
//$("#btn").on("click", function(){ });

@ -37,9 +37,9 @@
title="가상계좌개별생성">
가상계좌개별생성
</button>
<button type="button" id="" class="btn btn-primary"
title="주민번호복사">
주민번호복사
<button type="button" id="btnUpCopyPyrNo--${pageName}" class="btn btn-primary"
title="납부자번호복사">
납부자번호복사
</button>
<button type="button" id="" class="btn btn-primary"
title="압류상태로변경">

@ -41,9 +41,9 @@
title="특기사항관리">
특기사항관리
</button>
<button type="button" id="" class="btn btn-primary"
title="주민번호복사">
주민번호복사
<button type="button" id="btnDownCopyPyrNo--${pageName}" class="btn btn-primary"
title="납부자번호복사">
납부자번호복사
</button>
<button type="button" id="" class="btn btn-primary"
title="압류상태로변경">

@ -61,7 +61,7 @@
onclick="searchFromGridTitle('RTPYR_NM', this.innerText, 'match', 'perfect');"
>납부자명
</th>
<th class="cmn" style="width: 120px;"
<th class="cmn" style="width: 180px;"
onclick="searchFromGridTitle('RTPYR_NO', this.innerText, 'match', 'perfect');"
>납부자번호
</th>

Loading…
Cancel
Save