|
|
@@ -150,6 +150,14 @@
|
|
|
</label>
|
|
|
</td>
|
|
|
</tr>
|
|
|
+ <tr>
|
|
|
+ <th>카테고리</th>
|
|
|
+ <td>
|
|
|
+ <label class="chkBox" th:if="${cateList}" th:each="oneData, status : ${cateList}">
|
|
|
+ <input type="checkbox" name="cateList" th:value="${oneData.cateNo}" th:text="${oneData.cateNm}"/>
|
|
|
+ </label>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
<tr>
|
|
|
<th>제휴채널</th>
|
|
|
<td colspan="1">
|
|
|
@@ -218,12 +226,18 @@
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<th class="custJoinTr" colspan="1">신규회원여부<em class="required" title="필수"></em></th>
|
|
|
- <td colspan="3">
|
|
|
+ <td>
|
|
|
<select name="newCustYn" id="newCustYn" onchange="newCustYnChange(this)" required="required" data-valid-name="신규회원여부" th:field="*{newCustYn}">
|
|
|
<option value="Y" selected="selected">Y</option>
|
|
|
<option value="N" >N</option>
|
|
|
</select>
|
|
|
</td>
|
|
|
+ <th>댓글여부</th>
|
|
|
+ <td>
|
|
|
+ <select name="replyYn" th:field="*{replyYn}">
|
|
|
+ <option th:if="${useYnList}" th:each="oneData, status : ${useYnList}" th:value="${oneData.cd}" th:text="|${oneData.cdNm}|"></option>
|
|
|
+ </select>
|
|
|
+ </td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<th class="custJoinDateTr">신규회원기간시작일시<em class="required" title="필수"></em></th>
|
|
|
@@ -256,14 +270,6 @@
|
|
|
</select>
|
|
|
</td>
|
|
|
</tr>
|
|
|
- <tr>
|
|
|
- <th>댓글여부</th>
|
|
|
- <td colspan="3">
|
|
|
- <select name="replyYn" th:field="*{replyYn}">
|
|
|
- <option th:if="${useYnList}" th:each="oneData, status : ${useYnList}" th:value="${oneData.cd}" th:text="|${oneData.cdNm}|"></option>
|
|
|
- </select>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
<tr style="display:none" id="append1">
|
|
|
<th>댓글제목</th>
|
|
|
<td>
|
|
|
@@ -343,7 +349,7 @@
|
|
|
<div class="panelStyle" style="margin: unset;">
|
|
|
<!-- TITLE -->
|
|
|
<div class="panelTitle">
|
|
|
- <h2>카테고리 / 브랜드 등록</h2>
|
|
|
+ <h2>브랜드 등록</h2>
|
|
|
<span class="panelControl"> <i
|
|
|
class="fa inner-fa-chevron-up"></i> <!-- 열림/닫힘 화살표 -->
|
|
|
</span>
|
|
|
@@ -356,12 +362,12 @@
|
|
|
<col width="90%" />
|
|
|
</colgroup>
|
|
|
<tr>
|
|
|
- <th>카테고리/브랜드</th>
|
|
|
+ <th>브랜드</th>
|
|
|
<td>
|
|
|
<!-- 수정시 프로모션명 입력 : before -->
|
|
|
- <div class="padding10"
|
|
|
+ <!-- <div class="padding10"
|
|
|
style="display: inline-block; width: 49%;">
|
|
|
- <!--<span>공급업체 설정</span>-->
|
|
|
+ <span>공급업체 설정</span>
|
|
|
<div class="padding10 inner-tb-solid">
|
|
|
<span class="buttonSpan">
|
|
|
<button type="button"
|
|
|
@@ -375,7 +381,7 @@
|
|
|
style="width: 100%; height: 200px;"
|
|
|
class="ag-theme-balham"></div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
<div class="padding10"
|
|
|
style="display: inline-block; width: 49%;">
|
|
|
<!--<span>브랜드 설정</span>-->
|
|
|
@@ -550,6 +556,14 @@
|
|
|
</label>
|
|
|
</td>
|
|
|
</tr>
|
|
|
+ <tr>
|
|
|
+ <th>카테고리</th>
|
|
|
+ <td>
|
|
|
+ <label class="chkBox" th:if="${cateList}" th:each="oneData, status : ${cateList}">
|
|
|
+ <input type="checkbox" name="cateList" th:value="${oneData.cateNo}" th:text="${oneData.cateNm}"/>
|
|
|
+ </label>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
<tr>
|
|
|
<th>제휴채널</th>
|
|
|
<td colspan="1">
|
|
|
@@ -606,12 +620,18 @@
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<th class="custJoinTr" colspan="1">신규회원여부<em class="required" title="필수"></em></th>
|
|
|
- <td colspan="2">
|
|
|
+ <td>
|
|
|
<select name="newCustYn" id="newCustYn" onchange="newCustYnChange(this)" required="required" data-valid-name="신규회원여부">
|
|
|
<option value="Y" selected="selected">Y</option>
|
|
|
<option value="N" >N</option>
|
|
|
</select>
|
|
|
</td>
|
|
|
+ <th>댓글여부<em class="required" title="필수"></em></th>
|
|
|
+ <td>
|
|
|
+ <select name="replyYn">
|
|
|
+ <option th:if="${useYnList}" th:each="oneData, status : ${useYnList}" th:value="${oneData.cd}" th:selected="${oneData.cd} == 'N'" th:text="|${oneData.cdNm}|"></option>
|
|
|
+ </select>
|
|
|
+ </td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<th class="custJoinDateTr">신규회원기간시작일시<em class="required" title="필수"></em></th>
|
|
|
@@ -644,14 +664,6 @@
|
|
|
</select>
|
|
|
</td>
|
|
|
</tr>
|
|
|
- <tr>
|
|
|
- <th>댓글여부<em class="required" title="필수"></em></th>
|
|
|
- <td colspan="5">
|
|
|
- <select name="replyYn">
|
|
|
- <option th:if="${useYnList}" th:each="oneData, status : ${useYnList}" th:value="${oneData.cd}" th:selected="${oneData.cd} == 'N'" th:text="|${oneData.cdNm}|"></option>
|
|
|
- </select>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
<tr style="display:none" id="append1">
|
|
|
<th>댓글제목<em class="required" title="필수"></em></th>
|
|
|
<td>
|
|
|
@@ -688,7 +700,7 @@
|
|
|
<div class="panelStyle" style="margin: unset;">
|
|
|
<!-- TITLE -->
|
|
|
<div class="panelTitle">
|
|
|
- <h2>카테고리 / 브랜드 등록</h2>
|
|
|
+ <h2>브랜드 등록</h2>
|
|
|
<span class="panelControl"> <i
|
|
|
class="fa inner-fa-chevron-up"></i> <!-- 열림/닫힘 화살표 -->
|
|
|
</span>
|
|
|
@@ -702,12 +714,12 @@
|
|
|
<col width="90%" />
|
|
|
</colgroup>
|
|
|
<tr>
|
|
|
- <th>카테고리/브랜드</th>
|
|
|
+ <th>브랜드</th>
|
|
|
<td>
|
|
|
<!-- 수정시 프로모션명 입력 : before -->
|
|
|
- <div class="padding10"
|
|
|
+ <!-- <div class="padding10"
|
|
|
style="display: inline-block; width: 49%;">
|
|
|
- <!--<span>공급업체 설정</span>-->
|
|
|
+ <span>공급업체 설정</span>
|
|
|
<div class="padding10 inner-tb-solid">
|
|
|
<span class="buttonSpan">
|
|
|
<button type="button"
|
|
|
@@ -721,7 +733,7 @@
|
|
|
style="width: 100%; height: 200px;"
|
|
|
class="ag-theme-balham"></div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
<div class="padding10"
|
|
|
style="display: inline-block; width: 49%;">
|
|
|
<!--<span>브랜드 설정</span>-->
|
|
|
@@ -1119,11 +1131,11 @@
|
|
|
multiBrand.push(item.brandGroupNo);
|
|
|
});
|
|
|
|
|
|
- let allCateData = gagaAgGrid.getAllRowData(gridOptionsFGCateList);
|
|
|
- var multiCate = [];
|
|
|
+ //let allCateData = gagaAgGrid.getAllRowData(gridOptionsFGCateList);
|
|
|
+ /* var multiCate = [];
|
|
|
$.each(allCateData, function(idx, item) {
|
|
|
multiCate.push(item.cateNo);
|
|
|
- });
|
|
|
+ }); */
|
|
|
|
|
|
let allChannelData = gagaAgGrid.getAllRowData(gridOptionsAfList);
|
|
|
var multiChannel = [];
|
|
|
@@ -1179,14 +1191,17 @@
|
|
|
var usableCustGradeArr = [];
|
|
|
var chkCustGrade = $('#planRegisterForm input:checkbox[name=usableCustGradeArr]:checked');
|
|
|
|
|
|
- /* if(chkCustGrade.length < 1){
|
|
|
- mcxDialog.alert("사용가능고객등급을 체크해주세요.");
|
|
|
- return false;
|
|
|
- } */
|
|
|
+
|
|
|
for(let i=0; i< chkCustGrade.length; i++){
|
|
|
usableCustGradeArr.push(chkCustGrade.eq(i).val());
|
|
|
}
|
|
|
|
|
|
+ var chkCate = $('#planRegisterForm input:checkbox[name=cateList]:checked');
|
|
|
+ var allCateData = [];
|
|
|
+ for(let i=0; i< chkCate.length; i++){
|
|
|
+ allCateData.push(chkCate.eq(i).val());
|
|
|
+ }
|
|
|
+
|
|
|
var usableCustGbArr = [];
|
|
|
var chkCustGb = $('#planRegisterForm input:checkbox[name=usableCustGbArr]:checked');
|
|
|
|
|
|
@@ -1202,8 +1217,8 @@
|
|
|
let data = {
|
|
|
multiBrand : multiBrand
|
|
|
,brandList : allBrandData
|
|
|
- ,multiCate : multiCate
|
|
|
- ,CateList : allCateData
|
|
|
+ ,multiCate : allCateData
|
|
|
+ //,CateList : allCateData
|
|
|
,usableCustGradeArr : usableCustGradeArr
|
|
|
,usableCustGbArr : usableCustGbArr
|
|
|
,multiChannel : multiChannel
|
|
|
@@ -1275,15 +1290,17 @@
|
|
|
var usableCustGradeArr = [];
|
|
|
var chkCustGrade = $('#planUpdateForm input:checkbox[name=usableCustGradeArr]:checked');
|
|
|
|
|
|
- /* if(chkCustGrade.length < 1){
|
|
|
- mcxDialog.alert("사용가능고객등급을 체크해주세요.");
|
|
|
- return false;
|
|
|
- } */
|
|
|
-
|
|
|
+
|
|
|
for(let i=0; i< chkCustGrade.length; i++){
|
|
|
usableCustGradeArr.push(chkCustGrade.eq(i).val());
|
|
|
}
|
|
|
|
|
|
+ var chkCate = $('#planUpdateForm input:checkbox[name=cateList]:checked');
|
|
|
+ var allCateData = [];
|
|
|
+ for(let i=0; i< chkCate.length; i++){
|
|
|
+ allCateData.push(chkCate.eq(i).val());
|
|
|
+ }
|
|
|
+
|
|
|
var usableCustGbArr = [];
|
|
|
var chkCustGb = $('#planUpdateForm input:checkbox[name=usableCustGbArr]:checked');
|
|
|
|
|
|
@@ -1298,10 +1315,10 @@
|
|
|
let data = {
|
|
|
multiBrand : multiBrand
|
|
|
,brandList : allBrandData
|
|
|
- ,multiCate : multiCate
|
|
|
+ ,multiCate : allCateData
|
|
|
,multiChannel : multiChannel
|
|
|
,attendData : attendData
|
|
|
- ,CateList : allCateData
|
|
|
+ //,CateList : allCateData
|
|
|
,usableCustGradeArr : usableCustGradeArr
|
|
|
,usableCustGbArr : usableCustGbArr
|
|
|
,mode : $('#planUpdateForm input[name=mode]').val()
|
|
|
@@ -1485,35 +1502,33 @@
|
|
|
};
|
|
|
|
|
|
// 카테고리 리스트 설정
|
|
|
- var columnCateList = [
|
|
|
+/* var columnCateList = [
|
|
|
{width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
|
|
|
{headerName: "사이트", field: "siteCd", width: 120, cellClass: 'text-center'},
|
|
|
{headerName: "카테고리 구분", field: "cateGb", width: 110, cellClass: 'text-center'},
|
|
|
{headerName: "카테고리 이름", field: "cateNm", width: 120, cellClass: 'text-center'},
|
|
|
{headerName: "번호", field: "cateNo", width: 150, cellClass: 'text-center', hide: true},
|
|
|
- /* {headerName: "시퀀스", field: "tmtbGoodsSq", width: 150, cellClass: 'text-center', hide: true},
|
|
|
- {headerName: "삭제여부", field: "delYn", width: 150, cellClass: 'text-center', hide: true} */
|
|
|
- ];
|
|
|
+ ]; */
|
|
|
|
|
|
// 카테고리 그리드 설정
|
|
|
- var gridOptionsFGCateList = gagaAgGrid.getGridOptions(columnCateList);
|
|
|
+ /* var gridOptionsFGCateList = gagaAgGrid.getGridOptions(columnCateList);
|
|
|
gridOptionsFGCateList.rowSelection = "multiple";
|
|
|
- gridOptionsFGCateList.suppressRowClickSelection = true;
|
|
|
+ gridOptionsFGCateList.suppressRowClickSelection = true; */
|
|
|
|
|
|
// 브랜드 설정 선택삭제 버튼 클릭시
|
|
|
- $('#btnDeleteCate').on('click', function() {
|
|
|
+ /* $('#btnDeleteCate').on('click', function() {
|
|
|
gridOptionsFGCateList.api.updateRowData({remove:gagaAgGrid.selectedRowData(gridOptionsFGCateList)});
|
|
|
});
|
|
|
-
|
|
|
+ */
|
|
|
|
|
|
|
|
|
// 카테고리 추가
|
|
|
- $('#btnAddCate').on('click' , function () {
|
|
|
+ /* $('#btnAddCate').on('click' , function () {
|
|
|
cfnOpenCategoryPopup("fnSetPopupCategoryInfo");
|
|
|
- });
|
|
|
+ }); */
|
|
|
|
|
|
// 카테고리 추가 콜백 함수
|
|
|
- var fnSetPopupCategoryInfo = function (result) {
|
|
|
+ /* var fnSetPopupCategoryInfo = function (result) {
|
|
|
// 기존 리스트 데이터 for
|
|
|
for(let i = 0 ; i < result.length ; i++) {
|
|
|
let addChk = true, gridListValue = gagaAgGrid.getAllRowData(gridOptionsFGCateList); // 받아온 모든 데이터
|
|
|
@@ -1534,7 +1549,7 @@
|
|
|
gagaAgGrid.addRowData(gridOptionsFGCateList, {"siteCd":result[i].siteCd , "cateGb":result[i].cateGb, "cateNm":result[i].cateNm, "cateNo":result[i].cateNo});
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ } */
|
|
|
|
|
|
// 제휴채널 추가
|
|
|
$('#btnAddAf').on('click' , function () {
|
|
|
@@ -1707,7 +1722,7 @@
|
|
|
|
|
|
// 그리드 그리기
|
|
|
gagaAgGrid.createGrid("gridFGBrandList", gridOptionsFGBrandList);
|
|
|
- gagaAgGrid.createGrid("gridFGCateList", gridOptionsFGCateList);
|
|
|
+ //gagaAgGrid.createGrid("gridFGCateList", gridOptionsFGCateList);
|
|
|
gagaAgGrid.createGrid("gridAfPlanList", gridOptionsAfList);
|
|
|
gagaAgGrid.createGrid("gridAttendPlanList", gridOptionsAttendList);
|
|
|
|
|
|
@@ -1717,6 +1732,20 @@
|
|
|
$("#planUpdateForm input[name=custJoinEdDay]").val(planInfo.custJoinEddt.split(' ')[0]);
|
|
|
}
|
|
|
|
|
|
+ if(planCateList.length > 0){
|
|
|
+ var chkboxCnt = $('#planUpdateForm input:checkbox[name=cateList]').length;
|
|
|
+ var dataCnt = planCateList.length;
|
|
|
+ for(var i=0; i<chkboxCnt; i++){
|
|
|
+ for(var j=0; j<dataCnt; j++){
|
|
|
+ var data = planCateList[j].cateNo;
|
|
|
+ if($('#planUpdateForm input:checkbox[name=cateList]').eq(i).val() == data){
|
|
|
+ $('#planUpdateForm input:checkbox[name=cateList]').eq(i).prop('checked', true);
|
|
|
+ $("#planUpdateForm input:checkbox[name=cateList]").eq(i).parent().addClass('checked');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (planInfo.planGb =='C') {
|
|
|
gridOptionsAttendList.api.setRowData(benefitList);
|
|
|
$("#attendTh").removeAttr('style');
|
|
|
@@ -1739,7 +1768,7 @@
|
|
|
|
|
|
|
|
|
gridOptionsFGBrandList.api.setRowData(planBrandList);
|
|
|
- gridOptionsFGCateList.api.setRowData(planCateList);
|
|
|
+ //gridOptionsFGCateList.api.setRowData(planCateList);
|
|
|
gridOptionsAfList.api.setRowData(afChannelList);
|
|
|
|
|
|
if (planInfo.goodsLimitYn == 'N') {
|