Przeglądaj źródła

입점상품 등록/수정시 시즌 필수 처리

eskim 4 lat temu
rodzic
commit
d7f043d82b

+ 16 - 0
src/main/java/com/style24/scm/biz/service/TssGoodsService.java

@@ -2319,6 +2319,22 @@ public class TssGoodsService {
 			goods.setGoodsStat("10");
 			return goods;
 		}
+		
+		// 시즌
+		if (StringUtils.isBlank(goodsMass.getSeasonCd())) {
+			goods.setGoodsRegMsg("시즌코드 오류");
+			goods.setGoodsStat("10");
+			return goods;
+		}
+		goods.setSeasonCd(goodsMass.getSeasonCd().trim().toUpperCase());
+		commonCode.setCdGb("G006"); 	//시즌
+		commonCode.setCd(goods.getSeasonCd());
+		Collection<CommonCode> seasonCdList = rendererService.getCommonCodeList(commonCode);
+		if (seasonCdList == null || seasonCdList.isEmpty()) {
+			goods.setGoodsRegMsg("시즌코드구분 오류");
+			goods.setGoodsStat("10");
+			return goods;
+		}
 
 		// 브랜드 확인
 		Brand brand = new Brand();

+ 1 - 1
src/main/java/com/style24/scm/biz/web/TssGoodsController.java

@@ -1205,7 +1205,7 @@ public class TssGoodsController extends TssBaseController {
 			// 입점상품등록
 			// DB 처리 시 사용되는 파라미터명(셀명) 설정 -
 			String[] goodsNames = {"supplyGoodsCd", "supplyCompCd", "brandCd", "goodsNm", "goodsTnm", "goodsSnm1", "itemkindCd",
-				"sexGb", "listPrice", "currPrice", "goodsGb", "formalGb", "originCd", "makeYmd", "taxGb", "ageGrpCd", "adultYn",
+				"sexGb", "listPrice", "currPrice", "goodsGb", "formalGb",  "seasonCd", "originCd", "makeYmd", "taxGb", "ageGrpCd", "adultYn",
 				"certTargetGb", "certFormGb", "certType", "certNum", "optStr", "goodsContent",
 				"niClsfCd", "niContent1", "niContent2", "niContent3", "niContent4", "niContent5",
 				"niContent6", "niContent7", "niContent8", "niContent9", "niContent10", "niContent11", "niContent12",

+ 3 - 3
src/main/webapp/WEB-INF/views/goods/GoodsDetailForm.html

@@ -162,7 +162,7 @@
 									</tr>
 									<tr>
 										<td rowspan="12">&nbsp;</td>
-										<th>시즌</th>
+										<th>시즌<em class="required" title="필수"></em></th>
 										<td >
 											<select  name="seasonCd" id="seasonCd">
 												<option value="">[선택]</option>
@@ -1527,7 +1527,7 @@
 		}
 
 		//시즌 - 입점은 필수 제외
-		if ("Y" == $("#goodsDetailForm input[name=selfGoodsYn]").val()){
+		//if ("Y" == $("#goodsDetailForm input[name=selfGoodsYn]").val()){
 			if(gagajf.isNull($("#goodsDetailForm select[name=seasonCd]").val())){
 				mcxDialog.alertC("시즌을 선택해 주세요.", {
 					sureBtnText: "확인",
@@ -1537,7 +1537,7 @@
 				});
 				return;
 			}	
-		}
+		//}
 		
 		//성별
 		if(gagajf.isNull($("#goodsDetailForm select[name=sexGb]").val())){

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

@@ -135,9 +135,9 @@
 											<label class="rdoBtn"><input type="radio" name="selfMallYn" id="selfMallYnY" value="Y" checked="checked"/>Y</label>
 											<label class="rdoBtn"><input type="radio" name="selfMallYn" id="selfMallYnN" value="N"/>N</label>
 										</td>
-										<th>시즌</th>
+										<th>시즌<em class="required" title="필수"></em></th>
 										<td >
-											<select  name="seasonCd" id="seasonCd">
+											<select  name="seasonCd" id="seasonCd" required="required" data-valid-name="시즌" >
 												<option value="">[선택]</option>
 												<option th:if="${seasonList}" th:each="oneData, status : ${seasonList}" th:value="${oneData.cd}" th:text="${oneData.cdNm}"></option>
 											</select>