Explorar o código

쿠폰발행 오류 수정

bin2107 %!s(int64=5) %!d(string=hai) anos
pai
achega
783ed18668

+ 2 - 1
src/main/java/com/style24/admin/biz/web/TsaMarketingController.java

@@ -572,7 +572,8 @@ public class TsaMarketingController extends TsaBaseController {
 		// 사이트조회
 		mav.addObject("siteCdList", rendererService.getCommonCodeList("G000"));
 		// 사용가능 고객구분 조회
-		mav.addObject("usableCustGbList", rendererService.getCommonCodeList("G100"));
+		String[] exceptCds1 = {"G100_00"};
+		mav.addObject("usableCustGbList", rendererService.getCommonCodeList("G100", "Y", exceptCds1));
 		// 사용가능 고객등급 조회
 		mav.addObject("usableCustGradeList", rendererService.getCommonCodeList("G110"));
 		// 쿠폰발행사유 조회

+ 8 - 0
src/main/webapp/WEB-INF/views/marketing/CouponPopupForm.html

@@ -353,6 +353,7 @@
 									</tbody>
 								</table>
 								<div class="mdPopBtnB aR">
+									<button type="button" class="btn btn-info btn-lg" onclick="fnPubCustListPopUp();" th:if="${mode == 'U'}">발급받은회원</button>
 									<button type="button" class="btn btn-info btn-lg" onclick="fnCustomerIssuePopUp();" th:if="${mode == 'U' && cpnDetail.dcCdGb == 'G233_00'}">쿠폰발행</button>  <!-- 난수유형과 시리얼 유형에서는 쿠폰발행기능 X -->
 									<button type="button" class="btn btn-info btn-lg" onclick="fnCouponCreate();" th:if="${mode == 'N'}">등록</button>
 									<button type="button" class="btn btn-info btn-lg" onclick="fnCouponUpdate();" th:if="${mode == 'U'}">수정</button>
@@ -1457,6 +1458,13 @@
 
 		});
 	}
+
+	// 발급받은회원 팝업
+	function fnPubCustListPopUp(){
+		var cpnId = $('#CouponForm #cpnId').val();
+		cfnCpnPubCustListPopup(cpnId);
+	};
+
 	// 쿠폰발행팝업
 	function fnCustomerIssuePopUp(){
 		cfnCpnPubForCustPopup();

+ 16 - 2
src/main/webapp/WEB-INF/views/marketing/CouponPubForCustPopupForm.html

@@ -22,6 +22,7 @@
 		</div>
 		<div class="panelContent">
 			<form id="custSearchForm" name="custSearchForm" action="#" th:action="@{'/customer/active/list'}" >
+				<input type="hidden" name="searchDateGb" value="joinDt"/>
 				<table class="frmStyle">
 					<colgroup>
 						<col width="10%">
@@ -46,6 +47,7 @@
 							<th>회원구분</th>
 							<td>
 								<select name="custGb" id="custGb">
+									<option value="">전체</option>
 									<option th:if="${usableCustGbList}" th:each="oneData , status : ${usableCustGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
 								</select>
 							</td>
@@ -168,13 +170,25 @@
 		}
 	];
 
-	var pubCustGridOptions = gagaAgGrid.getGridOptions(columnDefs);
+	let pubCustGridOptions = gagaAgGrid.getGridOptions(columnDefs);
 
 	// 고객 조회
 	function fnSearchPubCustList(){
-		gagaAgGrid.fetch($("#custSearchForm").prop('action') , pubCustGridOptions , '#custSearchForm');
+		//gagaAgGrid.fetch($("#custSearchForm").prop('action') , pubCustGridOptions , '#custSearchForm');
+		gagaPaging.init('custSearchForm', fnSearchCallBack, 'custSearchForm', $('#custSearchForm select[name=pageSize]').val());
+		gagaPaging.load($('#custSearchForm input[name=pageNo]').val());
 	}
 
+	var fnSearchCallBack = function (result) {
+		//$('#gridRowTotalCount').html(result.pageing.pageable.totalCount.addComma());
+		//$('#custActiveForm input[name=pageNo]').val(result.pageing.pageable.pageNo.addComma());
+		//$('#pgNo').html(result.pageing.pageable.pageNo.addComma());
+		//$('#endPgNo').html(result.pageing.pageable.totalPage.addComma());
+
+		pubCustGridOptions.api.setRowData(result.custList);
+		//gagaPaging.createPagination(result.pageing.pageable);
+	};
+
 	function fnCpnPubCustomer(){
 		setReqValue();
 		checkValidation();