알림톡 발송결

This commit is contained in:
leejunho 2025-04-03 10:25:54 +09:00
parent 9c94241a52
commit d74c6febc5

View File

@ -1228,7 +1228,7 @@ function checkNumber(event) {
//재전송 스크립트 수정
$(window).on('load', function() {
if(${msgResendAllFlag eq 'Y'}) {
if(${kakaoVO.msgResendAllFlag eq 'Y'}) {
// 채널 ID 및 템플릿 선택 코드는 유지
$("#selectKakaoProfileList option").filter(function() {
return $(this).text() === '${kakaoVO.msgResendAllYellowId}';
@ -1242,43 +1242,47 @@ $(window).on('load', function() {
fn_viewDataInit02();
priceInit();
try {
// JSON 파싱
var resendListObj = JSON.parse('${resendListJson}');
var listCnt = resendListObj.length;
// 중복 제거 - Set 사용
var uniquePhones = new Set();
var uniqueResendList = [];
// 중복 제거 로직
for(var i = 0; i < resendListObj.length; i++) {
var phone = removeDash(resendListObj[i].callTo);
if(!uniquePhones.has(phone)) {
uniquePhones.add(phone);
uniqueResendList.push(resendListObj[i]);
}
}
// 중복 제거된 데이터로 처리
for(var i = 0; i < uniqueResendList.length; i++) {
var phoneNumber = removeDash(uniqueResendList[i].callTo);
// callTo 입력 필드에 값 설정 후 번호추가 버튼 클릭
$("#callTo").val(phoneNumber);
$(".addCallToF").trigger("click");
}
// 총 건수 확인
setTimeout(function() {
updateTotCnt();
}, 500);
} catch(e) {
console.error("재전송 데이터 처리 오류:", e);
}
var varList = $("#excelTemplateContent").val().match(/#\{([^}]+)\}/g);
if(varList == null){
try {
// JSON 파싱
var resendListObj = JSON.parse('${resendListJson}');
var listCnt = resendListObj.length;
// 중복 제거 - Set 사용
var uniquePhones = new Set();
var uniqueResendList = [];
// 중복 제거 로직
for(var i = 0; i < resendListObj.length; i++) {
var phone = removeDash(resendListObj[i].callTo);
if(!uniquePhones.has(phone)) {
uniquePhones.add(phone);
uniqueResendList.push(resendListObj[i]);
}
}
// 중복 제거된 데이터로 처리
for(var i = 0; i < uniqueResendList.length; i++) {
var phoneNumber = removeDash(uniqueResendList[i].callTo);
// callTo 입력 필드에 값 설정 후 번호추가 버튼 클릭
$("#callTo").val(phoneNumber);
$(".addCallToF").trigger("click");
}
// 총 건수 확인
setTimeout(function() {
updateTotCnt();
}, 500);
} catch(e) {
console.error("재전송 데이터 처리 오류:", e);
}
}
}
});