Procházet zdrojové kódy

딜상품 입점 허용처리, 세트 가겨노출관련 수정

eskim před 5 roky
rodič
revize
05ebc7c9d2

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

@@ -79,11 +79,10 @@
 							</select>
 						</td>
 						<th>원산지<em class="required" title="필수"></em></th>
-						<td ><select name="makeOriginCd" id="makeOriginCd">
+						<td ><select name="originCd" id="originCd">
 								<option value="">[전체]</option>
 								<option th:if="${makOriginList}" th:each="oneData, status : ${makOriginList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
 							</select>
-							<input type="hidden" id="makeNm" name="makeNm" />
 						</td>
 						<td colspan="2"></td>
 					</tr>
@@ -94,6 +93,7 @@
 					<button type="button" class="btn btn-danger btn-lg" onclick="fnGoodsDealDeleteRow();">행삭제</button>
 				</li>
 				<li class="right">
+					<strong class="cRed">* 구성상품은 일반상품만 가능합니다.</strong>
 					<button type="button" class="btn btnRight btn-default btn-lg" onclick="cfnDownloadSampleFile('SF003');">상품엑셀조회 양식 다운로드</button>
 					<button type="button" class="btn btnRight btn-success btn-lg" id="btnGoodsDealSearchExcel" >엑셀조회</button>
 					<button type="button" class="btn btnRight btn-base btn-lg" onclick="fnOpenGoodsDealPopup();">구상상품추가</button>
@@ -379,11 +379,11 @@
 			return false;
 		}
 		
-		if(gagajf.isNull($("#goodsDealForm select[name=makeOriginCd]").val())){
+		if(gagajf.isNull($("#goodsDealForm select[name=originCd]").val())){
 			mcxDialog.alertC('원산지를 입력해 주세요.', {
 				sureBtnText: "확인",
 				sureBtnClick: function() {
-					$("#goodsDealForm select[name=makeOriginCd]").focus();
+					$("#goodsDealForm select[name=originCd]").focus();
 				}
 			});	
 			return false;
@@ -469,7 +469,7 @@
 				});	
 				return false;
 			}
-			
+			/*
 			if (comSelfGoodsYn != item.selfGoodsYn){
 				optCheck = true;
 				mcxDialog.alertC("구상상품중 자사/입점상품 구분값이 다릅니다.\n확인해 주세요", {
@@ -480,7 +480,7 @@
 				});	
 				return false;
 			}else{
-				/* if (comSelfGoodsYn == "N" && (comSupplyCompCd != item.supplyCompCd)){
+				if (comSelfGoodsYn == "N" && (comSupplyCompCd != item.supplyCompCd)){
 					optCheck = true;
 					mcxDialog.alertC("구상상품중 입점은 같은 업체 상품만 가능합니다.\n확인해 주세요", {
 						sureBtnText: "확인",
@@ -489,7 +489,7 @@
 						}
 					});	
 					return false;
-				} */
+				}
 				
 				if (comSelfGoodsYn == "N"){
 					optCheck = true;
@@ -513,7 +513,7 @@
 					return false;
 				}
 			}
-			
+			*/
 			goodsCnt++;
 		});
 		

+ 16 - 7
src/main/webapp/WEB-INF/views/goods/GoodsSetForm.html

@@ -88,7 +88,6 @@
 								<option value="">[전체]</option>
 								<option th:if="${originCdList}" th:each="oneData, status : ${originCdList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
 							</select>
-							<input type="hidden" id="makeNm" name="makeNm" />
 						</td>
 					</tr>
 					<tr>
@@ -147,7 +146,7 @@
 			valueFormatter: function (params) { return gagaAgGrid.lookupValue(useYnList, params.value); },
 			valueParser: function (params) { return gagaAgGrid.lookupKey(useYnList, params.newValue); }
 		},
-		{headerName: "상품판매가", field: "currPrice" , width: 120, cellClass: 'text-right', editable: true, required: true,
+		{headerName: "상품판매가", field: "currPrice" , width: 120, cellClass: 'text-right', 
 			cellEditor: 'textCellEditor',
 			cellEditorParams: { maxlength: 14, validType: 'numeric'}
 		},
@@ -241,6 +240,10 @@
 		var idx = oldGoodsSetList.length+1; 
 		var setGoodsCurrPrice = 0;
 		
+		gridGoodsSetOptions.api.forEachNode(function(rowNode, index) {
+			setGoodsCurrPrice += Number(rowNode.data.compsCurrPrice);
+		});
+		
 		var isExist = false;
 		goodsData.forEach(function(goods){
 			isExist = false;
@@ -255,11 +258,6 @@
 				if (goods.supplyCompCd != rowNode.data.supplyCompCd){
 					isExist = true;
 				}
-				
-				if (!gagajf.isNull(rowNode.data.compsCurrPrice)){
-					setGoodsCurrPrice += Number(rowNode.data.compsCurrPrice);
-				}
-				 
 			});
 
 			if (goods.goodsType != "G056_N"){
@@ -514,8 +512,19 @@
 			return;
 		}
 		
+		
 		//화면에서 삭제
 		var removedData = gagaAgGrid.removeRowData(gridGoodsSetOptions, false);
+		
+		var setGoodsCurrPrice = 0;
+		
+		gridGoodsSetOptions.api.forEachNode(function(rowNode, index) {
+			if (!gagajf.isNull(rowNode.data.compsCurrPrice)){
+				setGoodsCurrPrice += Number(rowNode.data.compsCurrPrice);
+			}
+		});
+		
+		$('#goodsSetForm').find('#setGoodsCurrPrice').html(setGoodsCurrPrice.addComma());
 	}
 	
 /*]]>*/