|
|
@@ -36,7 +36,7 @@
|
|
|
<tr>
|
|
|
<th>프로모션명<em class="required" title="필수"></em></th>
|
|
|
<td>
|
|
|
- <input class="w50p disabledPoint" type="text" id="freegiftNm" name="freegiftNm" minlength="2" maxlength="30" required="required" data-valid-name="프로모션명"/>
|
|
|
+ <input class="w50p" type="text" id="freegiftNm" name="freegiftNm" minlength="2" maxlength="30" required="required" data-valid-name="프로모션명"/>
|
|
|
</td>
|
|
|
<th>프로모션ID</th>
|
|
|
<td>
|
|
|
@@ -262,7 +262,8 @@
|
|
|
<ul class="panelBar">
|
|
|
<li class="right">
|
|
|
<button type="button" class="btn btnRight btn-success btn-lg" id="btnSearchList">목록</button>
|
|
|
- <button type="button" class="btn btnRight btn-success btn-lg fgButton" id="btnFreegoodsPromotionSave">저장</button>
|
|
|
+ <button type="button" class="btn btnRight btn-success btn-lg fgButton" id="btnFreegoodsPromotionSave">저장</button> <!-- 프로모션 저장 (대기) -->
|
|
|
+ <button type="button" class="btn btnRight btn-success btn-lg fgButton" id="btnFreegoodsPromotionNameSave">저장</button> <!-- 프로모션명 저장 (진행) -->
|
|
|
<button type="button" class="btn btnRight btn-success btn-lg fgButton" id="btnChangeStatIng">진행</button>
|
|
|
<button type="button" class="btn btnRight btn-success btn-lg fgButton" id="btnPromotionDelete">삭제</button>
|
|
|
<button type="button" class="btn btnRight btn-success btn-lg fgButton" id="btnPromotionStop">중지</button>
|
|
|
@@ -564,7 +565,9 @@
|
|
|
// 진행 상태일 경우 노출 버튼 (저장 버튼은 중지시 수정 불가처리하기로하여 주석처리. 기획서대로 변경일 경우 주석 제거 및 if 제거)
|
|
|
if(freegift.freegiftStat == "G232_11") { // 진행 상태일 경우
|
|
|
// $("#freeGoodsPromotionForm #btnFreegoodsPromotionSave").show(); // 저장
|
|
|
+ $("#freegiftNm").prop("disabled", false); // 프로모션명
|
|
|
$("#freeGoodsPromotionForm #btnPromotionStop").show(); // 중지
|
|
|
+ $("#freeGoodsPromotionForm #btnFreegoodsPromotionNameSave").show(); // 프로모션 명 변경 버튼(저장) 노출
|
|
|
}
|
|
|
|
|
|
// 목록 버튼
|
|
|
@@ -631,7 +634,7 @@
|
|
|
$("#freeGoodsPromotionForm #G011_20").on("click", function() {
|
|
|
if(!$("#freeGoodsPromotionForm input[name=extmallYn]").hasClass("formControl")) { // 수정금지 상태가 아니라면
|
|
|
// 체크여부 확인 (선택되면 자동 checked 추가되는데, 추가되기 전 동작해서 반대로 지정)
|
|
|
- if($("#freeGoodsPromotionForm #G011_20").hasClass("checked")) {
|
|
|
+ if(!$("#freeGoodsPromotionForm #G011_20 #extmallYn").is(":checked")) {
|
|
|
$("#freeGoodsPromotionForm #btnExtmallPopup").hide();
|
|
|
$("#freeGoodsPromotionForm #extmallCntArea").hide();
|
|
|
$("#freeGoodsPromotionForm input[name=allYn]").prop("disabled", false); // 제휴몰 선택 안하면 지급 방법 수정 가능
|
|
|
@@ -706,6 +709,22 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ // 저장 버튼 클릭시
|
|
|
+ $('#freeGoodsPromotionForm #btnFreegoodsPromotionNameSave').on('click', function() {
|
|
|
+ if($('#freeGoodsPromotionForm input[name=freegiftNm]').val().length < 2) {
|
|
|
+ mcxDialog.alert("2자~30자 이상 프로모션명을 입력하세요.");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ // var params = $(formId).serialize();
|
|
|
+ var data = { freegiftSq : $("#freeGoodsPromotionForm input[name=freegiftSq]").val()
|
|
|
+ , freegiftNm : $("#freeGoodsPromotionForm input[name=freegiftNm]").val()
|
|
|
+ };
|
|
|
+
|
|
|
+ var jsonData = JSON.stringify(data);
|
|
|
+ gagajf.ajaxJsonSubmit('/marketing/freegoods/promotion/name/save', jsonData, fnFreeGoodsPromotionSaveFin);
|
|
|
+ });
|
|
|
+
|
|
|
// 저장 버튼 클릭시
|
|
|
$('#freeGoodsPromotionForm #btnFreegoodsPromotionSave').on('click', function() {
|
|
|
// 각 ag-grid list 수량
|
|
|
@@ -743,6 +762,11 @@
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
+ if($("#extmallYn").is(":checked") && extmallCnt < 1) {
|
|
|
+ mcxDialog.alert("제휴몰을 선택해주세요.");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
// 공급업체, 브랜드, 적용상품 중 1개 필수 체크
|
|
|
if(supplyCompCnt < 1 && brandCnt < 1 && applyGoodsCnt < 1) {
|
|
|
mcxDialog.alert("공급업체, 브랜드, 적용 상품 중 한가지 이상 등록해주세요.");
|