버튼 추가
Some checks failed
Close Pull Request / main (pull_request_target) Has been cancelled

This commit is contained in:
yangsh
2026-01-12 15:53:12 +09:00
parent 7a889170b6
commit b164c5b409
4 changed files with 130 additions and 0 deletions

View File

@@ -248,6 +248,18 @@
</div>
<div class="ml-auto">
<button class="btn btn-sm btn-outline-light" id="excel-download" onclick="send_api('O');">
모바일 V2 전송
</button>
<button class="btn btn-sm btn-outline-light" id="excel-download" onclick="send_api('H');">
홍보확인서 전송
</button>
<button class="btn btn-sm btn-outline-light" id="excel-download" onclick="send_api('T');">
전화확인 전송
</button>
<button class="btn btn-sm btn-outline-light" id="excel-download" onclick="send_api('D');">
등기부등본 전송
</button>
<button class="btn btn-sm btn-outline-success" id="excel-download">
<i class="fa fa-fw" aria-hidden="true" title="file-excel-o"></i>
엑셀다운로드
@@ -679,6 +691,80 @@
}
// 전송 api
function send_api(type) {
var nm = "";
if (type == "O") {
var nm = "모바일확인 V2";
} else if (type == 'H') {
var nm = '홍보확인서';
} else if (type == 'T') {
var nm = '전화확인';
} else {
var nm = '등기부등본';
}
swal.fire({
text: nm + " API를 전송하시겠습니까?",
type: "warning",
showCancelButton: true,
confirmButtonText: "예",
cancelButtonText: "아니오",
closeOnConfirm: false,
closeOnCancel: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
url: '/m710/m710a/sendApi',
contentType: 'application/x-www-form-urlencoded;charset=UTF-8',
method: 'POST',
data: { 'type': type },
beforeSend: function () {
blockUI.blockPage({
message: tpl
})
},
complete: function () {
blockUI.unblockPage()
},
error: function (xhr, error, thrown) {
blockUI.unblockPage()
var msg = "";
if (xhr.responseText != null) {
msg = xhr.responseText
} else {
msg = "잠시후 다시 시도해 주세요."
}
Swal.fire({
title: msg,
icon: "error"
})
},
success: function (result) {
if (result.code == '0') {
const fax_sq = result.data.fax_sq;
location.replace("<?= site_url('m708/m708a/detail') ?>/" + fax_sq);
} else {
Swal.fire({
title: result.msg,
icon: "error"
})
}
}
});
}
});
}
function getDateTimeString() {
const d = new Date();
const yyyy = d.getFullYear();