|
|
@@ -334,12 +334,12 @@
|
|
|
<span class="buttonSpan">
|
|
|
<button type="button"
|
|
|
class="btn btnRight btn-success btn-lg"
|
|
|
- id="btnAddCompany">업체 추가</button>
|
|
|
+ id="btnAddCorner">업체 추가</button>
|
|
|
<button type="button"
|
|
|
class="btn btnRight btn-success btn-lg"
|
|
|
- id="btnDeleteCompany">선택삭제</button>
|
|
|
+ id="btnDeleteCorner">선택삭제</button>
|
|
|
</span> <br />
|
|
|
- <div id="gridFGPromotionCompanyList"
|
|
|
+ <div id="gridFGCornerList"
|
|
|
style="width: 100%; height: 200px;"
|
|
|
class="ag-theme-balham"></div>
|
|
|
</div>
|
|
|
@@ -660,12 +660,12 @@
|
|
|
<span class="buttonSpan">
|
|
|
<button type="button"
|
|
|
class="btn btnRight btn-success btn-lg"
|
|
|
- id="btnAddCompany">업체 추가</button>
|
|
|
+ id="btnAddCorner">코너 추가</button>
|
|
|
<button type="button"
|
|
|
class="btn btnRight btn-success btn-lg"
|
|
|
- id="btnDeleteCompany">선택삭제</button>
|
|
|
+ id="btnDeleteCorner">선택삭제</button>
|
|
|
</span> <br />
|
|
|
- <div id="gridFGPromotionCompanyList"
|
|
|
+ <div id="gridFGCornerList"
|
|
|
style="width: 100%; height: 200px;"
|
|
|
class="ag-theme-balham"></div>
|
|
|
</div>
|
|
|
@@ -715,6 +715,7 @@
|
|
|
var fsrcPc = [[${fsrcPc}]];
|
|
|
var fsrcMobile = [[${fsrcMobile}]];
|
|
|
var planBrandList = [[${planBrandList}]];
|
|
|
+ var planCornerList = [[${planCornerList}]];
|
|
|
var snOptions;
|
|
|
|
|
|
// 카테고리 전시 여부
|
|
|
@@ -874,9 +875,18 @@
|
|
|
multiBrand.push(item.brandCd);
|
|
|
});
|
|
|
|
|
|
+ let allCornerData = gagaAgGrid.getAllRowData(gridOptionsFGCornerList);
|
|
|
+ var multiCorner = [];
|
|
|
+ $.each(allCornerData, function(idx, item) {
|
|
|
+ multiCorner.push(item.cateNo);
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
let data = {
|
|
|
multiBrand : multiBrand
|
|
|
,brandList : allBrandData
|
|
|
+ ,multiCorner : multiCorner
|
|
|
+ ,CornerList : allCornerData
|
|
|
,mode : $('#planWebRegisterForm input[name=mode]').val()
|
|
|
,planSq : $('#planWebRegisterForm input[name=planSq]').val()
|
|
|
,planGb : $('#planWebRegisterForm select[name=planGb]').val()
|
|
|
@@ -1052,6 +1062,59 @@
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+ // 코너 리스트 설정
|
|
|
+ var columnCornerList = [
|
|
|
+ {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 gridOptionsFGCornerList = gagaAgGrid.getGridOptions(columnCornerList);
|
|
|
+ gridOptionsFGCornerList.rowSelection = "multiple";
|
|
|
+ gridOptionsFGCornerList.suppressRowClickSelection = true;
|
|
|
+
|
|
|
+ // 브랜드 설정 선택삭제 버튼 클릭시
|
|
|
+ $('#btnDeleteCorner').on('click', function() {
|
|
|
+ gridOptionsFGCornerList.api.updateRowData({remove:gagaAgGrid.selectedRowData(gridOptionsFGCornerList)});
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ // 코너추가(카테고리 추가)
|
|
|
+ $('#btnAddCorner').on('click' , function () {
|
|
|
+ cfnOpenCategoryPopup("fnSetPopupCategoryInfo");
|
|
|
+ });
|
|
|
+
|
|
|
+ // 카테고리 추가 콜백 함수
|
|
|
+ var fnSetPopupCategoryInfo = function (result) {
|
|
|
+ // 기존 리스트 데이터 for
|
|
|
+ for(let i = 0 ; i < result.length ; i++) {
|
|
|
+ let addChk = true, gridListValue = gagaAgGrid.getAllRowData(gridOptionsFGCornerList); // 받아온 모든 데이터
|
|
|
+
|
|
|
+ // 받아온 data for
|
|
|
+ for(let j = 0 ; j < gridListValue.length ; j++) {
|
|
|
+ // 동일한 data는 추가하지 않음
|
|
|
+ if(gridListValue[j].cateNo == result[i].cateNo) { addChk = false; } // 중복체크
|
|
|
+ }
|
|
|
+
|
|
|
+ // 중복되지 않은 데이터 리스트에 추가
|
|
|
+ if(addChk) {
|
|
|
+ if(result[i].cate2No!=null)
|
|
|
+ {
|
|
|
+ mcxDialog.alert('카테고리1에서 선택하세요.');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ gagaAgGrid.addRowData(gridOptionsFGCornerList, {"siteCd":result[i].siteCd , "cateGb":result[i].cateGb, "cateNm":result[i].cateNm, "cateNo":result[i].cateNo});
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
|
@@ -1063,6 +1126,7 @@
|
|
|
|
|
|
// 그리드 그리기
|
|
|
gagaAgGrid.createGrid("gridFGBrandList", gridOptionsFGBrandList);
|
|
|
+ gagaAgGrid.createGrid("gridFGCornerList", gridOptionsFGCornerList);
|
|
|
|
|
|
if (mode =='U') {
|
|
|
/* $('#planWebDetailForm input[name=badgeFcolor]').spectrum({
|
|
|
@@ -1078,6 +1142,7 @@
|
|
|
}); */
|
|
|
|
|
|
gridOptionsFGBrandList.api.setRowData(planBrandList);
|
|
|
+ gridOptionsFGCornerList.api.setRowData(planCornerList);
|
|
|
|
|
|
if (planInfo.goodsLimitYn == 'N') {
|
|
|
$('#planWebDetailForm input[name=goodsLimitQty]').hide();
|