Parcourir la source

Merge remote-tracking branch 'origin/develop' into jsh77b

jsh77b il y a 4 ans
Parent
commit
bae0b66089

+ 55 - 0
src/main/java/com/style24/admin/biz/web/TsaCustomerController.java

@@ -527,6 +527,38 @@ public class TsaCustomerController extends TsaBaseController {
 
 		return mav;
 	}
+	
+	/**
+	 * 메시지 발송 팝업 화면
+	 *
+	 * @param elementCellPhnno - 휴대폰
+	 * @param elementCustNo - 고객일련번호
+	 * @param maskingCellPhnno - 마스킹된 휴대폰
+	 * @return ModelAndView
+	 * @author moon
+	 * @since 2021. 09. 07
+	 */
+	@GetMapping("/lms/popup/form2")
+	public ModelAndView lmsPopupForm2(@RequestParam(value = "elementCellPhnno", required = false) String elementCellPhnno, @RequestParam(value = "elementCustNo") String elementCustNo, @RequestParam(value = "elementMaskingCellPhnno", required = false) String maskingCellPhnno, @RequestParam(value = "pageGb", required = false) String pageGb) {
+		ModelAndView mav = new ModelAndView();
+		// 휴대폰 번호
+		mav.addObject("elementCellPhnno", elementCellPhnno);
+
+		// 휴대폰 번호
+		mav.addObject("maskingCellPhnno", StringUtils.defaultString(maskingCellPhnno, ""));
+
+		// 고객 아이디
+		mav.addObject("elementCustNo", elementCustNo);
+
+		mav.addObject("callBack", TscConstants.CALLCENTER_TEL_NO);
+
+		mav.addObject("pageGb", StringUtils.defaultString(pageGb, ""));
+
+		mav.setViewName("customer/LmsPopupForm2");
+
+		return mav;
+	}
+	
 
 	/**
 	 * 메시지 발송
@@ -573,6 +605,29 @@ public class TsaCustomerController extends TsaBaseController {
 
 		return super.ok(message.getMessage("SUCC_0005"));
 	}
+	
+	/**
+	 * 메시지 발송
+	 *
+	 * @param customer -고객정보
+	 * @return GagaResponse
+	 * @author moon
+	 * @since 2021. 09. 07
+	 */
+	@PostMapping("/message/send3")
+	@ResponseBody
+	public GagaResponse sendLms3(@RequestBody Customer customer) {
+		//Customer custInfo = customerService.getCustomerInfo(customer.getCustNo());
+		//customer.setCustNm(custInfo.getCustNm());
+		//customer.setCustNo(custInfo.getCustNo());
+		log.info("sendLms3 {}"+customer);
+		if (StringUtils.isNotBlank(customer.getCellPhnno())) {
+			Integer userNo = TsaSession.getInfo().getUserNo();
+			kakaotalkService.sendBasicLms3(customer, userNo);
+		}
+
+		return super.ok(message.getMessage("SUCC_0005"));
+	}	
 
 	/**
 	 * 메시지 발송 팝업 화면

+ 1 - 1
src/main/java/com/style24/persistence/mybatis/shop/TsaWithdraw.xml

@@ -507,7 +507,7 @@
 		     , CASE WHEN WD_SHIP_STATE = '12' THEN   FN_GET_CODE_NM('G321', Z.WD_REASON_CD)
 		            WHEN WD_SHIP_STATE = '84' THEN   FN_GET_CODE_NM('G322', Z.WD_REASON_CD) ELSE '' END AS WD_REASON_CD_NM
 		     , FN_GET_CODE_NM('G685', Z.CHG_STAT) AS CHG_STAT_NM
-		     , CASE WHEN Z.WD_GB = 'W' THEN '회수요청' ELSE '직접배송' END AS WD_GB_NM 
+		     , CASE WHEN Z.WD_GB = 'W' THEN '방문회수' ELSE '직접배송' END AS WD_GB_NM 
 		FROM (
 		    SELECT A.*, ROW_NUMBER() OVER(ORDER BY  A.ORD_CHG_SQ, A.ORD_NO DESC, A.ORD_DTL_NO )  RNUM 
 		    FROM ( 

+ 159 - 0
src/main/webapp/WEB-INF/views/customer/LmsPopupForm2.html

@@ -0,0 +1,159 @@
+<!DOCTYPE html>
+<html lang="ko"
+	  xmlns:th="http://www.thymeleaf.org">
+<!--
+ *******************************************************************************
+ * @source  : LmsPopupForm2.html
+ * @desc    : 메시지발송팝업 Page
+ *============================================================================
+ * STYLE24
+ * Copyright(C) 2021 TSIT, All rights reserved.
+ *============================================================================
+ * VER  DATE         AUTHOR      DESCRIPTION
+ * ===  ===========  ==========  =============================================
+ * 1.0  2021.01.21   jsshin     최초 작성
+ *******************************************************************************
+ -->
+
+	<div class="modelessPopup draggable" data-width="800">
+		<div class="panelStyle">
+			<!-- TITLE -->
+			<div class="panelTitle">
+				<strong>LMS 발송</strong>
+				<button type="button" class="close" onclick="uifnPopupClose('popupLmsForm2')"><em class="fa fa-times"></em></button>
+			</div>
+			<!-- //TITLE -->
+			<!-- CONTENT -->
+			<div class="panelContent">
+				<form id="lmsForm" name="lmsForm">
+					<table class="frmStyle">
+						<colgroup>
+							<col style="width:1%"/>
+							<col style="width:40%"/>
+						</colgroup>
+						<tbody>
+						<tr >
+							<th>수신자번호<em class="required" title="필수"></em></th>
+							<td th:if="${maskingCellPhnno == ''}">
+								<input type="text" class="w150" name="cellPhnno" data-valid-name="수신번호"  required="required"  maxlength="13" />
+							</td>
+							<td th:unless="${maskingCellPhnno == ''}">
+								<input type="hidden" name="cellPhnno"/>
+								<input type="text" class="w150" name="maskingCellPhnno" readonly="readonly"/>
+							</td>
+						</tr>
+						<tr>
+							<th>발신자번호<em class="required" title="필수"></em></th>
+							<td>
+								<input type="text" class="w150" name="callcenterTelNo" data-valid-name="발신자번호" readonly="readonly" th:value="${callBack}" maxlength="11" />
+							</td>
+						</tr>
+						<tr>
+							<th>메시지<em class="required" title="필수"></em></th>
+							<td>
+								<span name="topStr">[STYLE24]안녕하세요. 스타일24입니다.</span>
+								<textarea class="textareaR4"  style="resize: none;" name ="content" ></textarea>
+								스타일24 바로가기 : https://www.style24.com<br>
+								스타일24 고객센터 : 1544-5336<br>
+								<span name="count">0</span> / 2000 byte
+							</td>
+						</tr>
+						</tbody>
+					</table>
+				</form>
+			</div>
+			<ul class="panelBar">
+				<li class="right">
+					<button type="button" class="btn btn-success btn-lg" id="btnSendSms">발송</button>
+					<button type="button" class="btn btn-gray btn-lg" onclick="uifnPopupClose('popupLmsForm2')">취소</button>
+				</li>
+			</ul>
+			<!-- //CONTENT -->
+		</div>
+	</div>
+
+<script th:inline="javascript">
+	/*<![CDATA[*/
+	const elementCellPhnno = [[${elementCellPhnno}]];
+	const elementCustNo = [[${elementCustNo}]];
+	const maskingCellPhnno = [[${maskingCellPhnno}]];
+	const pageGb = [[${pageGb}]];
+
+	// 메시지 전송
+	$("#btnSendSms").on("click",function() {
+		let formId = '#lmsForm';
+		let custNo = gagajf.isNull(pageGb) ? $(elementCustNo).val() : elementCustNo;
+		
+		const $callcenterTelNo = $(formId+' input[name=callcenterTelNo]');
+		if(gagajf.isNull($callcenterTelNo.val())) {
+			mcxDialog.alertC("발신자번호를 입력해 주세요.", {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$callcenterTelNo.focus();
+				}
+			});
+			return;
+		}		
+		
+		if(!gagajf.validation(formId)){
+			return;
+		}
+		
+		const $content = $(formId+' textarea[name=content]');
+		
+		if(gagajf.isNull($content.val())) {
+			mcxDialog.alertC("보낼 메시지를 입력해 주세요.", {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$content.focus();
+				}
+			});
+			return;
+		}
+		
+
+		
+		mcxDialog.confirm("저장하시겠습니까?", {
+			cancelBtnText: "취소",
+			sureBtnText: "확인",
+			sureBtnClick: function() {
+				let params = $(formId).serializeObject();
+				//params.custNo = custNo;
+				let jsonData = JSON.stringify(params);
+				//if(gagajf.isNull(pageGb)){
+					// gagajf.ajaxJsonSubmit('/customer/message/send', jsonData, uifnPopupClose('popupLmsForm'));
+				//} else {
+					gagajf.ajaxJsonSubmit('/customer/message/send3', jsonData, uifnPopupClose('popupLmsForm'));
+				//}
+			}
+		});
+		
+
+	});
+
+	// LMS 글자수 변경 이벤트
+	$("#lmsForm textarea[name=content]").bind('focus focusout input keyup keydown paste change', function () {
+		cfnGetTextLength($(this), 2000, $('#lmsForm span[name=count]'));
+	});
+
+	var fnInitDataSet = function () {
+		let cellPhnno = gagajf.isNull(pageGb) ? $(elementCellPhnno).val() : elementCellPhnno;
+		if (gagajf.isNull(maskingCellPhnno)) {
+			$('#lmsForm input[name=cellPhnno]').val(cellPhnno);
+		} else {
+			let mkCellPhno = gagajf.isNull(pageGb) ? $(maskingCellPhnno).val() : maskingCellPhnno;
+			$('#lmsForm input[name=cellPhnno]').val(cellPhnno);
+			$('#lmsForm input[name=maskingCellPhnno]').val(mkCellPhno);
+		}
+	}
+
+	$(document).ready(function() {
+		fnInitDataSet();
+	
+		cfnGetTextLength("#lmsForm textarea[name=content]", 2000, $('#lmsForm span[name=count]'));
+	
+		$('#popupLmsForm2 .modelessPopup').draggable({'cancel':'.panelContent'});
+	});
+	/*]]>*/
+</script>
+</html>

+ 16 - 0
src/main/webapp/WEB-INF/views/delivery/DeliveryListForm.html

@@ -284,6 +284,11 @@
 		{headerName: "휴대번호", 		field: "maskingOrdPhnno", 		width: 100, cellClass: 'text-center',
 			valueGetter: function (params) { return params.data.maskingOrdPhnno; }
 		},
+		{headerName: "LMS", 			field: "maskingOrdPhnno", 	width: 80, cellClass: "text-center",
+			cellRenderer: function(params) {
+				return '<button type="button" class="btn btn-base btn-sm" onclick="fnLms(\'' + params.data.ordPhnno + '\',\'' + params.data.custNo + '\');">&nbsp;LMS&nbsp;</button>';
+			}			
+		},
 		{headerName: "수령인", 		field: "maskingRecipNm", 		width: 100, cellClass: 'text-center'},
 		{headerName: "공급업체", 		field: "supplyCompNm", 	width: 150, cellClass: 'text-center'},
 		{headerName: "브랜드", 		field: "brandNm", 	width: 150, cellClass: 'text-center'},
@@ -481,6 +486,17 @@
 		cfnOpenModalPopup(actionUrl, 'popupDeliveryDetailItemForm');
 	}
 	
+	/*************************************************************************
+	*  LMS
+	**************************************************************************/	
+	var fnLms = function(chgerPhnno, custNo){
+		let param = {};
+		param.elementCellPhnno = chgerPhnno; 
+		param.elementCustNo =    custNo; 
+		param.pageGb = 'delv';
+		cfnOpenLmsPopup2(param);
+	}
+
 	
 	/*************************************************************************
 	* 엑셀다운로드 

+ 15 - 1
src/main/webapp/WEB-INF/views/order/OrderDetailForm.html

@@ -81,7 +81,9 @@
 							</td>
 							<td th:text="${orderInfo[0].ordNo}"></td>
 							<td th:text="${orderInfo[0].ordEmail}"></td>
-							<td th:text="${orderInfo[0].ordPhnno}"></td>
+							<td>
+							<a href="script:void(0)" class="lmsPop" th:attr="orderPhnno=${orderInfo[0].ordPhnno}"><th:block th:text="${orderInfo[0].ordPhnno}"></th:block></a>
+							</td>
 							<td th:text="${orderInfo[0].custGbNm}"></td>
 							<td th:text="${orderInfo[0].managedRsnNm}"></td>
 							<td th:text="${orderInfo[0].custGradeNm}"></td>
@@ -1139,6 +1141,18 @@ $(document).ready(function () {
 			cfnOpenCustDetailPopup(custNo);
 		}
 	});
+	
+	// LMS
+	$(".lmsPop").on("click", function(){
+		//var custNo = $(this).attr("custNo");
+		var orderPhnno = $(this).attr("orderPhnno");
+		let param = {};
+		param.elementCellPhnno = orderPhnno; 
+		param.elementCustNo =    ""; 
+		param.pageGb = 'delv';
+		cfnOpenLmsPopup2(param);
+		
+	});	
 });
 
 //0원이하이면 '-' 처리 삭제 함수

+ 7 - 7
src/main/webapp/WEB-INF/views/withdraw/WithdrawDirectiveListForm.html

@@ -65,8 +65,8 @@
 							<td>
 								<select name="chgGb"class="w100">
 									<option value="">&nbsp;전체&nbsp;</option>
-									<option value="G680_30"> 반품 </option>
-									<option value="G680_40"> 교환 </option>
+									<option value="G680_30"> 반품요청 </option>
+									<option value="G680_40"> 교환요청 </option>
 								</select>
 							</td>
 							<th>진행상태</th>
@@ -96,7 +96,7 @@
 									
 								</select>
 							</td>
-							<th>회수상태</th>
+							<th>CJ회수상태</th>
 							<td colspan="3">
 								<select name="wdShipState" class="w100">
 									<option value="">전체</option>
@@ -210,7 +210,7 @@
 				return retStr;
 			}			
 		},
-		{headerName: "회수상태", 		field: "wdShipStateNm", width: 120, cellClass: "text-center"},
+		{headerName: "CJ회수상태", 		field: "wdShipStateNm", width: 120, cellClass: "text-center"},
 		{headerName: "회수상태수신일시", field: "wdStateDt", 		width: 120, cellClass: "text-center"},
 		{headerName: "미회수사유", 		field: "wdReasonCdNm", 	width: 100, cellClass: "text-center"},
 		{headerName: "재회수지시", 		field: "wdShipState", 	width: 100,	cellClass: 'text-center',
@@ -425,10 +425,10 @@
 	**************************************************************************/	
 	var fnLms = function(chgerPhnno, custNo){
 		let param = {};
-		param.elementCellPhnno = chgerPhnno; //'010-4016-1558'; //'#custInfoForm input[name=cellPhnno]';
-		param.elementCustNo =    custNo; //'100025';// '#custInfoForm input[name=custNo]';
+		param.elementCellPhnno = chgerPhnno; 
+		param.elementCustNo =    custNo; 
 		param.pageGb = 'delv';
-		cfnOpenLmsPopup(param);
+		cfnOpenLmsPopup2(param);
 	}
 
 	/*************************************************************************

+ 3 - 3
src/main/webapp/WEB-INF/views/withdraw/WithdrawExceptionListForm.html

@@ -666,10 +666,10 @@
 	**************************************************************************/	
 	var fnLms = function(chgerPhnno, custNo){
 		let param = {};
-		param.elementCellPhnno = chgerPhnno; //'010-4016-1558'; //'#custInfoForm input[name=cellPhnno]';
-		param.elementCustNo =    custNo; //'100025';// '#custInfoForm input[name=custNo]';
+		param.elementCellPhnno = chgerPhnno; 
+		param.elementCustNo =    custNo; 
 		param.pageGb = 'delv';
-		cfnOpenLmsPopup(param);
+		cfnOpenLmsPopup2(param);
 	};
 	
 	/*************************************************************************

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

@@ -468,6 +468,34 @@ var cfnOpenLmsPopup = function(param) {
 	cfnOpenModalPopup(actionUrl, 'popupLmsForm');
 }
 
+/**
+ * @type   : function
+ * @access : public
+ * @desc   : LMS 팝업
+ * <pre>
+ *     var param = {};
+ *     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
+ * @author : jsshin
+ */
+var cfnOpenLmsPopup2 = function(param) {
+	var actionUrl = '/customer/lms/popup/form2?elementCellPhnno=' + encodeURIComponent(param.elementCellPhnno)
+			+ '&elementCustNo=' + encodeURIComponent(param.elementCustNo);
+	if (!gagajf.isNull(param.elementMaskingCellPhnno)) {
+		actionUrl +='&elementMaskingCellPhnno=' + encodeURIComponent(param.elementMaskingCellPhnno);
+	}
+	if (!gagajf.isNull(param.pageGb)) {
+		actionUrl +='&pageGb=' + param.pageGb;
+	}
+	cfnOpenModalPopup(actionUrl, 'popupLmsForm2');
+}
+
+
 /**
  * @type   : function
  * @access : public