jsshin vor 4 Jahren
Ursprung
Commit
cfcfe298e9

+ 5 - 2
src/main/java/com/style24/admin/biz/web/TsaCustomerController.java

@@ -9,6 +9,7 @@ import com.style24.core.biz.service.TscKakaotalkService;
 import com.style24.core.support.env.TscConstants;
 import com.style24.core.support.session.TscSession;
 import com.style24.core.support.util.CryptoUtils;
+import com.style24.core.support.util.MaskingUtils;
 import com.style24.persistence.TscPageRequest;
 import com.style24.persistence.domain.Coupon;
 import com.style24.persistence.domain.CustContactHst;
@@ -470,7 +471,8 @@ public class TsaCustomerController extends TsaBaseController {
 	@GetMapping("/lms/popup/form")
 	public ModelAndView lmsPopupForm(@RequestParam(value = "elementCellPhnno", required = false) String elementCellPhnno
 									, @RequestParam(value = "elementCustNo") String elementCustNo
-									, @RequestParam(value = "elementMaskingCellPhnno", required = false) String maskingCellPhnno) {
+									, @RequestParam(value = "elementMaskingCellPhnno", required = false) String maskingCellPhnno
+									, @RequestParam(value = "type", required = false) String pageGb) {
 		ModelAndView mav = new ModelAndView();
 		// 휴대폰 번호
 		mav.addObject("elementCellPhnno", elementCellPhnno);
@@ -483,12 +485,13 @@ public class TsaCustomerController extends TsaBaseController {
 
 		mav.addObject("callBack", TscConstants.CALLCENTER_TEL_NO);
 
+		mav.addObject("pageGb", pageGb);
+
 		mav.setViewName("customer/LmsPopupForm");
 
 		return mav;
 	}
 
-
 	/**
 	 * 메시지 발송
 	 *

+ 4 - 3
src/main/webapp/WEB-INF/views/customer/LmsPopupForm.html

@@ -72,11 +72,12 @@
 	const elementCellPhnno = [[${elementCellPhnno}]];
 	const elementCustNo = [[${elementCustNo}]];
 	const maskingCellPhnno = [[${maskingCellPhnno}]];
+	const pageGb = [[${pageGb}]];
 
 	// 메시지 전송
 	$("#btnSendSms").on("click",function() {
 		let formId = '#lmsForm';
-		let custNo = $(elementCustNo).val();
+		let custNo = gagajf.isNull(pageGb) ? $(elementCustNo).val() : elementCustNo;
 		const $content = $(formId+' textarea[name=content]');
 
 		if(gagajf.isNull($content.val())) {
@@ -112,11 +113,11 @@
 	});
 
 	var fnInitDataSet = function () {
-		let cellPhnno = $(elementCellPhnno).val();
+		let cellPhnno = gagajf.isNull(pageGb) ? $(elementCellPhnno).val() : elementCellPhnno;
 		if (gagajf.isNull(maskingCellPhnno)) {
 			$('#lmsForm input[name=cellPhnno]').val(cellPhnno);
 		} else {
-			let mkCellPhno = $(maskingCellPhnno).val();
+			let mkCellPhno = gagajf.isNull(pageGb) ? $(maskingCellPhnno).val() : maskingCellPhnno;
 			$('#lmsForm input[name=cellPhnno]').val(cellPhnno);
 			$('#lmsForm input[name=maskingCellPhnno]').val(mkCellPhno);
 		}

+ 4 - 0
src/main/webapp/ux/js/admin.popup.js

@@ -428,6 +428,7 @@ function cfnCouponCreatePopup(mode, cpnId, callbackfun){
  *     param.elementCellPhnno = 'input[name=cellPhnno]';
  *     param.elementCustNo = 'input[name=custNo]';
  *     param.elementMaskingCellPhnno = 'textarea[name=elementMaskingCellPhnno]'; //선택
+ *     paras.pageGb = 'delv'; // 선택
  *     cfnOpenLmsPopup(param);
  * </pre>
  * @since  : 2020/02/13
@@ -439,6 +440,9 @@ var cfnOpenLmsPopup = function(param) {
 	if (!gagajf.isNull(param.elementMaskingCellPhnno)) {
 		actionUrl +='&elementMaskingCellPhnno=' + encodeURIComponent(param.elementMaskingCellPhnno);
 	}
+	if (!gagajf.isNull(param.pageGb)) {
+		actionUrl +='&pageGb=' + param.pageGb;
+	}
 	cfnOpenModalPopup(actionUrl, 'popupLmsForm');
 }