친구톡 테스트 번호 삭제 및 imgLink 추가

This commit is contained in:
hehihoho3@gmail.com 2025-07-30 09:55:45 +09:00
parent 49d01ac119
commit d1e1244cd5

View File

@ -629,6 +629,7 @@ function getTemplateImagUrl(){
$('#imgTitle').removeClass('file_none')
.text(fileName);
$('#imgLinkTemp').val($('#imgLink').val()); // 회색 처리 + 입력 불가
$('#imgLink').prop('disabled', true); // 회색 처리 + 입력 불가
@ -1146,9 +1147,7 @@ function fn_sendMsgData(){
if(!confirm("친구톡을 발송하시겠습니까?")){
return false;
}
@ -1168,21 +1167,21 @@ function fn_sendMsgData(){
// 2. buttonVOList 수동으로 수집
var buttonList = [];
$('input[name^="buttonVOList"]').each(function() {
let nameAttr = $(this).attr('name');
let match = nameAttr.match(/buttonVOList\[(\d+)\]\.(\w+)/);
if (match) {
let index = parseInt(match[1]);
let key = match[2];
let value = $(this).val();
if (!buttonList[index]) buttonList[index] = {};
buttonList[index][key] = value;
}
let nameAttr = $(this).attr('name');
let match = nameAttr.match(/buttonVOList\[(\d+)\]\.(\w+)/);
if (match) {
let index = parseInt(match[1]);
let key = match[2];
let value = $(this).val();
if (!buttonList[index]) buttonList[index] = {};
buttonList[index][key] = value;
}
});
// 3. formData에 배열로 추가
formData["buttonVOList"] = buttonList;
// 회색 처리 + 입력 불가
// 4. 기존의 buttonVOList[0].xxx 형태 제거
Object.keys(formData).forEach(function(key) {
@ -1196,14 +1195,15 @@ function fn_sendMsgData(){
delete formData[key];
});
formData["imgLink"] = $('#imgLinkTemp').val();
// 빈 값 제거
removeEmptyValues(formData);
// 선택된 데이터 추가
formData["mjonFTSendVOList"] = $selectedData;
// JSON 데이터 확인
console.log("최종 formData:", JSON.stringify(formData));
// 프로그래스파 시간을 위한 계산
var estimtedTime = calculateEstimatedTime(tableL.getRows().length);
@ -2097,7 +2097,7 @@ function updateButtons(){
<div class="clearfix receipt_num">
<div class="receipt_num_top">
<label for="callTo" class="label">받는 번호입력</label>
<input type="text" value="01012341234" placeholder="번호를 입력하세요" id="callTo" name="callTo" onfocus="this.placeholder=''" onblur="this.placeholder='번호를 입력하세요'" style="width:340px;">
<input type="text" value="" placeholder="번호를 입력하세요" id="callTo" name="callTo" onfocus="this.placeholder=''" onblur="this.placeholder='번호를 입력하세요'" style="width:340px;">
<button type="button" class="btnType btnType6 addCallToF">번호추가</button>
<span><span class="vMiddle">*</span> 중복번호는 한번만 발송됩니다.</span>
</div>