쿠폰발송관리-마케팅대상검색 ajax오류 수정(1)
This commit is contained in:
@@ -196,4 +196,7 @@ public class BOMbrSrchVO extends AbstractVO {
|
||||
/*회원구분코드*/
|
||||
private String mbrDvCd;
|
||||
|
||||
/*마케팅 동의 팝업 읽기모드 여부*/
|
||||
private String readonlyAt;
|
||||
|
||||
}
|
||||
|
||||
@@ -656,7 +656,7 @@ public class MngrMbrController {
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value="/selectMarketingTrgetSrchPopupForm")
|
||||
public String selectMarketingTrgetSrchPopupForm(ModelMap model, MbrSrchVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
public String selectMarketingTrgetSrchPopupForm(ModelMap model, BOMbrSrchVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
vo.setPopDv("Y");
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
|
||||
@@ -1850,6 +1850,47 @@ function validateInput(input, opts = {}) {
|
||||
});
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
form데이터 sealize 후 json 스트링 형태로 전환
|
||||
************************************************************ */
|
||||
function queryToJson(queryString) {
|
||||
let jsonObj = {};
|
||||
let pairs = queryString.split("&");
|
||||
|
||||
$.each(pairs, function (index, pair) {
|
||||
let [key, value] = pair.split("=");
|
||||
if(!fn_is_empty(value)){
|
||||
jsonObj[key] = value ? decodeURIComponent(value) : "";
|
||||
}
|
||||
});
|
||||
const jsonStr = JSON.stringify(jsonObj);
|
||||
return jsonStr;
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
치환코드 입력
|
||||
* @param eventObj : 클릭객체
|
||||
* @param closestSelector : 가까운 객체
|
||||
* @param targetTextAreaSelector : textarea타겟대상
|
||||
* @property obj : 클릭한 객체
|
||||
* @property existingVal : 기존 텍스트 아리아 값
|
||||
* @property addStr : 추가할 치환 코드
|
||||
* @description 치환 문자 td 클래스에 subst 클래스 부여
|
||||
************************************************************ */
|
||||
function fn_set_substituon_in_texatarea(eventObj, closestSelector, targetTextAreaSelector) {
|
||||
const obj = $(eventObj);
|
||||
let existingVal = $("#"+targetTextAreaSelector).val();
|
||||
let addStr;
|
||||
const addStrT = obj.closest(closestSelector).find(".subst").text();
|
||||
const addStrV = obj.closest(closestSelector).find(".subst").val();
|
||||
if(!fn_is_empty(addStrT)){
|
||||
addStr = addStrT;
|
||||
}else{
|
||||
addStr = addStrV;
|
||||
}
|
||||
existingVal = existingVal + " " +addStr;
|
||||
$("#"+targetTextAreaSelector).val(existingVal);
|
||||
}
|
||||
|
||||
/* ************************************************************
|
||||
* 인피니티 스크롤 공통 처리 (footer가 보이면 callback함수 호출)
|
||||
|
||||
@@ -372,6 +372,23 @@
|
||||
!confirm("예상 마케팅 대상은 0명입니다 적용하시겠습니까?")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($("#srchBtn").attr("srchAt") === 'Y') {
|
||||
let params = $('#mbrSrchForm').serialize();
|
||||
$("#cndChngAt").val("N");
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<c:url value="/mngr/mbr/selectMarketingTrgetSrchPopupInqire"/>',
|
||||
data: params,
|
||||
success: function (data) {
|
||||
data = JSON.parse(data.resBody.result);
|
||||
let tot = data.cnt;
|
||||
/*마케팅 대상 화면, 부모 화면 텍스트, value 제어*/
|
||||
$(".srchMarketingTrgetCnt").text(fn_format_comma(tot));
|
||||
$("#marketingTrgetInfo").val(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
fn_close_modal("marketing-trget-search");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user