|
@@ -83,6 +83,7 @@
|
|
|
<button type="button" class="btn btn-default btn-lg" onclick="cfnDownloadSampleFile('SF012');">엑셀상품추가 양식 다운로드</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-default btn-lg" onclick="fnOpenGoodsPopup();">상품추가</button>
|
|
|
<!-- <button type="button" class="btn btn-default btn-lg"onclick="fnDispOrdChange();">순서변경</button> -->
|
|
<!-- <button type="button" class="btn btn-default btn-lg"onclick="fnDispOrdChange();">순서변경</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>
|
|
<button type="button" class="btn btn-danger btn-lg" onclick="fnDeleteGoods();">선택삭제</button>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -356,14 +357,15 @@
|
|
|
var uploadGoodsUrl = [[${@environment.getProperty('upload.goods.view')}]];
|
|
var uploadGoodsUrl = [[${@environment.getProperty('upload.goods.view')}]];
|
|
|
var columnDefsGoods = [
|
|
var columnDefsGoods = [
|
|
|
{width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
|
|
{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>'; }
|
|
, cellRenderer: function(params) {return '<a href="javascript:void(0);">' + params.value + '</a>'; }
|
|
|
},
|
|
},
|
|
|
- {headerName: "상품명" , field:'goodsNm' , width:300, cellClass: 'text-left'},
|
|
|
|
|
- {headerName: "이미지" , field:'imgPath6' , width:100 , height:60, cellClass: 'text-right'
|
|
|
|
|
|
|
+ {headerName: "상품명" , field:'goodsNm' , width:300, cellClass: 'text-left', editable: false},
|
|
|
|
|
+ {headerName: "이미지" , field:'imgPath6' , width:100 , height:60, cellClass: 'text-right', editable: false
|
|
|
, cellRenderer: function(params) {
|
|
, cellRenderer: function(params) {
|
|
|
var imgPath = '';
|
|
var imgPath = '';
|
|
|
if (params.data.imgType == "A"){
|
|
if (params.data.imgType == "A"){
|
|
@@ -381,11 +383,11 @@
|
|
|
, editable : true, cellEditor: 'numericCellEditor'
|
|
, editable : true, cellEditor: 'numericCellEditor'
|
|
|
, valueFormatter: function(params) { return params.value.addComma(); }
|
|
, 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'; }
|
|
, cellRenderer: function(params) {return !gagajf.isNull(params.value) ? params.value : '0'; }
|
|
|
},
|
|
},
|
|
|
- {headerName: "할인율(%)" , field:'dcRate' , width:80 , cellClass: 'text-center'},
|
|
|
|
|
- {headerName: "TAG가" , field:'tagPrice' , width:100, cellClass: 'text-right'
|
|
|
|
|
|
|
+ {headerName: "할인율(%)" , field:'dcRate' , width:80 , cellClass: 'text-center', editable: false},
|
|
|
|
|
+ {headerName: "TAG가" , field:'tagPrice' , width:100, cellClass: 'text-right', editable: false
|
|
|
,valueFormatter: function(params) {
|
|
,valueFormatter: function(params) {
|
|
|
if(params.value && params.value > 0) {
|
|
if(params.value && params.value > 0) {
|
|
|
return params.value.addComma();
|
|
return params.value.addComma();
|
|
@@ -394,19 +396,19 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- {headerName: "정상가" , field:'listPrice' , width:100, cellClass: 'text-right' , hide : true
|
|
|
|
|
|
|
+ {headerName: "정상가" , field:'listPrice' , width:100, cellClass: 'text-right' , hide : true, editable: false
|
|
|
, valueFormatter: function(params) { return params.value.addComma(); }
|
|
, 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(); }
|
|
, 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); }
|
|
, valueFormatter: function(params) { return gagaAgGrid.lookupValue(goodsStatList, params.value); }
|
|
|
},
|
|
},
|
|
|
- {headerName: "업체" , field:'supplyCompNm' , width:150, cellClass: 'text-left'},
|
|
|
|
|
- {headerName: "기획전상세" , field:'planDtlSq' , width:200, cellClass: 'text-left', hide: true},
|
|
|
|
|
- {headerName: "등록일" , field:'regDt' , width:100, cellClass: 'text-left'
|
|
|
|
|
|
|
+ {headerName: "업체" , field:'supplyCompNm' , width:150, cellClass: 'text-left', editable: false},
|
|
|
|
|
+ {headerName: "기획전상세" , field:'planDtlSq' , width:200, cellClass: 'text-left', hide: true, editable: false},
|
|
|
|
|
+ {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") : ''; }
|
|
, cellRenderer: function(params) { return !gagajf.isNull(params.value) ? params.value.toDate("YYYY-MM-DD HH:MM:SS").format("YYYY-MM-DD") : ''; }
|
|
|
},
|
|
},
|
|
|
];
|
|
];
|
|
@@ -415,6 +417,8 @@
|
|
|
gridOptionsGoods.rowSelection = 'multiple';
|
|
gridOptionsGoods.rowSelection = 'multiple';
|
|
|
gridOptionsGoods.rowHeight = 60; //이미지가 있을경우 높이 지정해야함.
|
|
gridOptionsGoods.rowHeight = 60; //이미지가 있을경우 높이 지정해야함.
|
|
|
gridOptionsGoods.suppressRowClickSelection = true;
|
|
gridOptionsGoods.suppressRowClickSelection = true;
|
|
|
|
|
+ gridOptionsGoods.stopEditingWhenGridLosesFocus = true;
|
|
|
|
|
+ gridOptionsGoods.defaultColDef.editable = true;
|
|
|
|
|
|
|
|
gridOptionsGoods.onCellClicked = function(event) {
|
|
gridOptionsGoods.onCellClicked = function(event) {
|
|
|
if (event.colDef.field == 'goodsCd') {
|
|
if (event.colDef.field == 'goodsCd') {
|
|
@@ -449,6 +453,23 @@
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ // 상품 정렬(순서) 전체 변경
|
|
|
|
|
+ var fnModifyGoods = function() {
|
|
|
|
|
+ var changeData = gagaAgGrid.getChangedData(gridOptionsGoods);
|
|
|
|
|
+
|
|
|
|
|
+ mcxDialog.confirm('정렬된 순서를 변경하시겠습니까?', {
|
|
|
|
|
+ cancelBtnText: "취소",
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ var jsonData = JSON.stringify(changeData);
|
|
|
|
|
+
|
|
|
|
|
+ gagajf.ajaxJsonSubmit('/marketing/planning/corner/goods/modify', jsonData, function() {
|
|
|
|
|
+ fnConnerGoodsSearch();
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
// 기획전 상세일련번호 전역 변수
|
|
// 기획전 상세일련번호 전역 변수
|
|
|
var _planDtlSq = '';
|
|
var _planDtlSq = '';
|