Просмотр исходного кода

Merge branch 'develop' into bin2107

bin2107 5 лет назад
Родитель
Сommit
39d1886b99

+ 26 - 1
src/main/webapp/WEB-INF/views/goods/GoodsDealForm.html

@@ -257,6 +257,9 @@
 			if (goods.goodsType != "G056_N"){
 				isExist = true;
 			}
+			if (goods.selfGoodsYn != "Y"){
+				isExist = true;
+			}
 
 			if(!isExist){
 				var data = { 
@@ -476,7 +479,7 @@
 				});	
 				return false;
 			}else{
-				if (comSelfGoodsYn == "N" && (comSupplyCompCd != item.supplyCompCd)){
+				/* if (comSelfGoodsYn == "N" && (comSupplyCompCd != item.supplyCompCd)){
 					optCheck = true;
 					mcxDialog.alertC("구상상품중 입점은 같은 업체 상품만 가능합니다.\n확인해 주세요", {
 						sureBtnText: "확인",
@@ -485,6 +488,28 @@
 						}
 					});	
 					return false;
+				} */
+				
+				if (comSelfGoodsYn == "N"){
+					optCheck = true;
+					mcxDialog.alertC("구상상품중 자사 상품만 가능합니다.\n확인해 주세요", {
+						sureBtnText: "확인",
+						sureBtnClick: function() {
+							gridGoodsDealOptions.api.setFocusedCell(index, "goodsCd", null);
+						}
+					});	
+					return false;
+				}
+				
+				if (comSupplyCompCd != item.supplyCompCd){
+					optCheck = true;
+					mcxDialog.alertC("구상상품은 같은 업체 상품만 가능합니다.\n확인해 주세요", {
+						sureBtnText: "확인",
+						sureBtnClick: function() {
+							gridGoodsDealOptions.api.setFocusedCell(index, "goodsCd", null);
+						}
+					});	
+					return false;
 				}
 			}
 			

+ 26 - 2
src/main/webapp/WEB-INF/views/goods/GoodsSetForm.html

@@ -235,7 +235,9 @@
 			if (goods.goodsType != "G056_N"){
 				isExist = true;
 			}
-			
+			if (goods.selfGoodsYn != "Y"){
+				isExist = true;
+			}
 			if(!isExist){
 				
 				var data = { 
@@ -416,7 +418,7 @@
 				});	
 				return false;
 			}else{
-				if (comSelfGoodsYn == "N" && (comSupplyCompCd != item.supplyCompCd)){
+				/* if (comSelfGoodsYn == "N" && (comSupplyCompCd != item.supplyCompCd)){
 					optCheck = true;
 					mcxDialog.alertC("구상상품중 입점은 같은 업체 상품만 가능합니다.\n확인해 주세요", {
 						sureBtnText: "확인",
@@ -425,6 +427,28 @@
 						}
 					});	
 					return false;
+				} */
+				
+				if (comSelfGoodsYn == "N"){
+					optCheck = true;
+					mcxDialog.alertC("구상상품중 자사 상품만 가능합니다.\n확인해 주세요", {
+						sureBtnText: "확인",
+						sureBtnClick: function() {
+							gridGoodsSetOptions.api.setFocusedCell(index, "goodsCd", null);
+						}
+					});	
+					return false;
+				}
+				
+				if (comSupplyCompCd != item.supplyCompCd){
+					optCheck = true;
+					mcxDialog.alertC("구상상품은 같은 업체 상품만 가능합니다.\n확인해 주세요", {
+						sureBtnText: "확인",
+						sureBtnClick: function() {
+							gridGoodsSetOptions.api.setFocusedCell(index, "goodsCd", null);
+						}
+					});	
+					return false;
 				}
 			}