|
|
@@ -82,6 +82,7 @@
|
|
|
<button type="button" class="btn btn-Right btn-default btn-lg"onclick="fnGoodsExcelUpload();">엑셀상품추가/수정</button>
|
|
|
<button type="button" class="btn btn-default btn-lg" onclick="cfnDownloadSampleFile('SF012');">엑셀상품추가 양식 다운로드</button>
|
|
|
<button type="button" class="btn btn-default btn-lg" onclick="fnOpenGoodsPopup();">상품추가</button>
|
|
|
+ <button type="button" class="btn btn-info btn-lg" onclick="fnModifyGoods();">정렬수정</button>
|
|
|
<button type="button" class="btn btn-danger btn-lg" onclick="fnDeleteGoods();">선택삭제</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -307,7 +308,8 @@
|
|
|
mcxDialog.alert('진행기간 시작일자는 종료일자보다 클 수 없습니다.');
|
|
|
result = false;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ /* 21.12.03 제외요청 처리
|
|
|
if (Number(data.startSearchDate.replaceAll("-", "")) < Number(_today.replaceAll("-", "")) && data.crud == 'C') {
|
|
|
mcxDialog.alert('시작일자는 오늘포함 이후로 등록해주세요.');
|
|
|
result = false;
|
|
|
@@ -327,7 +329,7 @@
|
|
|
if (eddt[0].replaceAll("-", "") < data.endSearchDate.replaceAll("-", "")) {
|
|
|
mcxDialog.alert("기획전 종료일보다 코너종료일이 클 수 없습니다.");
|
|
|
result = false;
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
if (result) {
|
|
|
data.dispStdt = data.startSearchDate + ' ' + data.startSearchTime;
|
|
|
@@ -357,14 +359,15 @@
|
|
|
var uploadGoodsUrl = [[${@environment.getProperty('upload.goods.view')}]];
|
|
|
var columnDefsGoods = [
|
|
|
{width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
|
|
|
- {headerName: "정렬" , field:'dispOrd' , width:50, cellClass: 'text-center'
|
|
|
- , valueFormatter: function(params) { return params.value.addComma(); }
|
|
|
+ {headerName: "정렬" , field:'dispOrd' , width:50, cellClass: 'text-right',
|
|
|
+ cellEditor: 'textCellEditor',
|
|
|
+ cellEditorParams: { maxlength: 3, required: true }
|
|
|
},
|
|
|
- {headerName: "상품코드" , field:'goodsCd' , width:150, cellClass: 'text-left'
|
|
|
+ {headerName: "상품코드" , field:'goodsCd' , width:150, cellClass: 'text-left', editable: false
|
|
|
, cellRenderer: function(params) {return '<a href="javascript:void(0);">' + params.value + '</a>'; }
|
|
|
},
|
|
|
- {headerName: "상품명" , field:'goodsNm' , width:300, cellClass: 'text-left'},
|
|
|
- {headerName: "이미지" , field:'sysImgNm' , width:100 , height:60, cellClass: 'text-right'
|
|
|
+ {headerName: "상품명" , field:'goodsNm' , width:300, cellClass: 'text-left', editable: false},
|
|
|
+ {headerName: "이미지" , field:'sysImgNm' , width:100 , height:60, cellClass: 'text-right', editable: false
|
|
|
,cellRenderer: function(params) {
|
|
|
return '<img width="60" src="'+ _goodsUrl+ "/" + params.value + '?RS=60" alt="" onclick="cfnOpenImagePreViewPopup(\'goodsImgView\', \''+ _goodsUrl+ "/" + params.value +'\')" onerror="this.src=\'/image/no.png\';"/>';
|
|
|
}
|
|
|
@@ -373,23 +376,23 @@
|
|
|
, editable : true, cellEditor: 'numericCellEditor'
|
|
|
, valueFormatter: function(params) { return params.value.addComma(); }
|
|
|
}, */
|
|
|
- {headerName: "재고" , field:'stockQtySum' , width:80 , cellClass: 'text-center'
|
|
|
+ {headerName: "재고" , field:'stockQtySum' , width:80 , cellClass: 'text-center', editable: false
|
|
|
, cellRenderer: function(params) {return !gagajf.isNull(params.value) ? params.value : '0'; }
|
|
|
},
|
|
|
- {headerName: "할인율(%)" , field:'dcRate' , width:80 , cellClass: 'text-center'},
|
|
|
+ {headerName: "할인율(%)" , field:'dcRate' , width:80 , cellClass: 'text-center', editable: false},
|
|
|
{headerName: "정상가" , field:'listPrice' , width:100, cellClass: 'text-right' , hide : true
|
|
|
, valueFormatter: function(params) { return params.value.addComma(); }
|
|
|
},
|
|
|
- {headerName: "판매가" , field:'currPrice' , width:100, cellClass: 'text-right'
|
|
|
+ {headerName: "판매가" , field:'currPrice' , width:100, cellClass: 'text-right', editable: false
|
|
|
, valueFormatter: function(params) { return params.value.addComma(); }
|
|
|
},
|
|
|
- {headerName: "정상/이월여부", field:'formalGb' , width:120, cellClass: 'text-center'},
|
|
|
- {headerName: "상품상태" , field:'goodsStat' , width:100, cellClass: 'text-center'
|
|
|
+ {headerName: "정상/이월여부", field:'formalGb' , width:120, cellClass: 'text-center', editable: false},
|
|
|
+ {headerName: "상품상태" , field:'goodsStat' , width:100, cellClass: 'text-center', editable: false
|
|
|
, valueFormatter: function(params) { return gagaAgGrid.lookupValue(goodsStatList, params.value); }
|
|
|
},
|
|
|
- {headerName: "업체" , field:'supplyCompNm' , width:150, cellClass: 'text-left'},
|
|
|
+ {headerName: "업체" , field:'supplyCompNm' , width:150, cellClass: 'text-left', editable: false},
|
|
|
{headerName: "기획전상세" , field:'planDtlSq' , width:200, cellClass: 'text-left', hide: true},
|
|
|
- {headerName: "등록일" , field:'regDt' , width:100, cellClass: 'text-left'
|
|
|
+ {headerName: "등록일" , field:'regDt' , width:100, cellClass: 'text-left', editable: false
|
|
|
, cellRenderer: function(params) { return !gagajf.isNull(params.value) ? params.value.toDate("YYYY-MM-DD HH:MM:SS").format("YYYY-MM-DD") : ''; }
|
|
|
},
|
|
|
];
|
|
|
@@ -398,7 +401,9 @@
|
|
|
gridOptionsGoods.rowSelection = 'multiple';
|
|
|
gridOptionsGoods.rowHeight = 60; //이미지가 있을경우 높이 지정해야함.
|
|
|
gridOptionsGoods.suppressRowClickSelection = true;
|
|
|
-
|
|
|
+ gridOptionsGoods.stopEditingWhenGridLosesFocus = true;
|
|
|
+ gridOptionsGoods.defaultColDef.editable = true;
|
|
|
+
|
|
|
gridOptionsGoods.onCellClicked = function(event) {
|
|
|
if (event.colDef.field == 'goodsCd') {
|
|
|
// 상품 상세 팝업
|
|
|
@@ -432,7 +437,28 @@
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ // 상품 정렬(순서) 전체 변경
|
|
|
+ var fnModifyGoods = function() {
|
|
|
+ var changeData = gagaAgGrid.getChangedData(gridOptionsGoods);
|
|
|
+
|
|
|
+ if( changeData.length < 1 ){
|
|
|
+ mcxDialog.alert('변경할 데이터가 없습니다.');
|
|
|
+ }else{
|
|
|
+ mcxDialog.confirm('정렬된 순서를 변경하시겠습니까?', {
|
|
|
+ cancelBtnText: "취소",
|
|
|
+ sureBtnText: "확인",
|
|
|
+ sureBtnClick: function() {
|
|
|
+ var jsonData = JSON.stringify(changeData);
|
|
|
+
|
|
|
+ gagajf.ajaxJsonSubmit('/marketing/planning/corner/goods/modify', jsonData, function() {
|
|
|
+ fnConnerGoodsSearch();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// 기획전 상세일련번호 전역 변수
|
|
|
var _planDtlSq = '';
|
|
|
|