|
|
@@ -245,12 +245,12 @@
|
|
|
|
|
|
// 기존상품
|
|
|
var oldGoodsDealList = gagaAgGrid.getAllRowData(gridGoodsDealOptions);
|
|
|
- var idx = oldGoodsDealList.length+1;
|
|
|
+ var idx = oldGoodsDealList.length;
|
|
|
|
|
|
var isExist = false;
|
|
|
goodsData.forEach(function(goods){
|
|
|
isExist = false;
|
|
|
-
|
|
|
+
|
|
|
gridGoodsDealOptions.api.forEachNode(function(rowNode, index) {
|
|
|
if (goods.goodsCd == rowNode.data.compsGoodsCd){
|
|
|
isExist = true;
|
|
|
@@ -264,7 +264,12 @@
|
|
|
// isExist = true;
|
|
|
//}
|
|
|
|
|
|
+ if (idx >= 200){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
if(!isExist){
|
|
|
+ idx++;
|
|
|
var data = {
|
|
|
compsGoodsCd: goods.goodsCd
|
|
|
, goodsType: 'G056_D'
|
|
|
@@ -285,11 +290,12 @@
|
|
|
//그리드 마지막에 추가해야함
|
|
|
gridGoodsDealOptions.api.updateRowData({add: [data], addIndex: idx});
|
|
|
|
|
|
- idx++;
|
|
|
-
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
});
|
|
|
gridGoodsDealOptions.api.refreshCells();
|
|
|
+ uifnPopupClose('popupGoods');
|
|
|
}
|
|
|
|
|
|
//엑셀 상품 조회
|