|
@@ -538,6 +538,23 @@
|
|
|
$('#moreBetterForm input[name=tmtbStdt]').focus();
|
|
$('#moreBetterForm input[name=tmtbStdt]').focus();
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
+ // 공급업체&&브랜드 체크
|
|
|
|
|
+ let allSupplyCompCnt = gagaAgGrid.getAllRowData(gridOptionsFGCompanyList).length;
|
|
|
|
|
+ let allBrandCnt = gagaAgGrid.getAllRowData(gridOptionsFGBrandList).length;
|
|
|
|
|
+ console.log('allSupplyCompCnt>>>>'+allSupplyCompCnt);
|
|
|
|
|
+ console.log('allBrandCnt>>>>'+allBrandCnt);
|
|
|
|
|
+ if(allSupplyCompCnt>0){
|
|
|
|
|
+ if(allBrandCnt<1){
|
|
|
|
|
+ mcxDialog.alert('브랜드를 추가해주세요.');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if(allBrandCnt>0){
|
|
|
|
|
+ if(allSupplyCompCnt<1){
|
|
|
|
|
+ mcxDialog.alert('공급업체를 추가해주세요.');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
// 각 ag-grid list 수량
|
|
// 각 ag-grid list 수량
|
|
|
let supplyCompCnt = gagaAgGrid.selectedRowData(gridOptionsFGCompanyList).length;
|
|
let supplyCompCnt = gagaAgGrid.selectedRowData(gridOptionsFGCompanyList).length;
|
|
@@ -587,12 +604,14 @@
|
|
|
|
|
|
|
|
$('#moreBetterForm input[name=applyGb]').val($('input:radio[name="sectionGb"]:checked').val());
|
|
$('#moreBetterForm input[name=applyGb]').val($('input:radio[name="sectionGb"]:checked').val());
|
|
|
|
|
|
|
|
|
|
+ /*
|
|
|
var jsonData = JSON.stringify($('#moreBetterForm').serializeObject());
|
|
var jsonData = JSON.stringify($('#moreBetterForm').serializeObject());
|
|
|
gagajf.ajaxJsonSubmit($('#moreBetterForm').prop('action'), jsonData, function() {
|
|
gagajf.ajaxJsonSubmit($('#moreBetterForm').prop('action'), jsonData, function() {
|
|
|
fnMorebetterFormClose();
|
|
fnMorebetterFormClose();
|
|
|
$('#btnInit').trigger('click');
|
|
$('#btnInit').trigger('click');
|
|
|
$('#btnSearch').trigger('click');
|
|
$('#btnSearch').trigger('click');
|
|
|
});
|
|
});
|
|
|
|
|
+ */
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
|
|
@@ -615,6 +634,13 @@
|
|
|
gagaAgGrid.addRowData(gridOptionsFGCompanyList, {"supplyCompCd" : result[i].supplyCompCd, "supplyCompNm" : result[i].supplyCompNm, "targetGb" : "G260_13"});
|
|
gagaAgGrid.addRowData(gridOptionsFGCompanyList, {"supplyCompCd" : result[i].supplyCompCd, "supplyCompNm" : result[i].supplyCompNm, "targetGb" : "G260_13"});
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ // 브랜드 데이터 체크
|
|
|
|
|
+ let allBrandCnt = gagaAgGrid.getAllRowData(gridOptionsFGBrandList).length;
|
|
|
|
|
+ if(allBrandCnt<1){
|
|
|
|
|
+ mcxDialog.alert('브랜드를 추가해주세요.');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
// 브랜드 설정 / 브랜드 추가 콜백함수 (단수로 가져오므로 복수일 경우에 수정 확인 필요)
|
|
// 브랜드 설정 / 브랜드 추가 콜백함수 (단수로 가져오므로 복수일 경우에 수정 확인 필요)
|
|
@@ -632,6 +658,41 @@
|
|
|
gagaAgGrid.addRowData(gridOptionsFGBrandList, {"brandCd" : result[i].brandCd, "brandEnm" : result[i].brandEnm, "supplyCompNm" : result[i].supplyCompNm, "targetGb" : "G260_12"});
|
|
gagaAgGrid.addRowData(gridOptionsFGBrandList, {"brandCd" : result[i].brandCd, "brandEnm" : result[i].brandEnm, "supplyCompNm" : result[i].supplyCompNm, "targetGb" : "G260_12"});
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ // 공급업체 데이터 체크
|
|
|
|
|
+ var allSupplyCompData = gagaAgGrid.getAllRowData(gridOptionsFGCompanyList);
|
|
|
|
|
+ var allBrandData = gagaAgGrid.getAllRowData(gridOptionsFGBrandList);
|
|
|
|
|
+
|
|
|
|
|
+ console.log('allSupplyCompData cnt>>'+allSupplyCompData.length);
|
|
|
|
|
+ console.log('allBrandData cnt>>'+allBrandData.length);
|
|
|
|
|
+
|
|
|
|
|
+ if(allSupplyCompData.length < 1){
|
|
|
|
|
+ mcxDialog.alert('공급업체를 추가해주세요.');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 공급업체+브랜드 상품조회
|
|
|
|
|
+ var multiSupplyCompCd = [];
|
|
|
|
|
+ $.each(allSupplyCompData, function(idx, item) {
|
|
|
|
|
+ multiSupplyCompCd.push(item.supplyCompCd);
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ var multiBrand = [];
|
|
|
|
|
+ $.each(allBrandData, function(idx, item) {
|
|
|
|
|
+ multiBrand.push(item.brandCd);
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ var data = {multiSupplyCompCd : multiSupplyCompCd
|
|
|
|
|
+ ,multiBrand : multiBrand
|
|
|
|
|
+ ,pageingYn : "N"
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ var jsonData = JSON.stringify(data);
|
|
|
|
|
+ gagajf.ajaxJsonSubmit('/goods/list', jsonData, function(result) {
|
|
|
|
|
+ console.log('goodsList cnt>>'+result.goodsList.length);
|
|
|
|
|
+ console.log('goodsList >>'+result.goodsList);
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
// 분담업체율 설정 / 업체 추가 콜백함수
|
|
// 분담업체율 설정 / 업체 추가 콜백함수
|