|
@@ -31,25 +31,6 @@
|
|
|
<input type="hidden" name="sectionGbList"/> <!-- 다다익선 구간/혜택 리스트 -->
|
|
<input type="hidden" name="sectionGbList"/> <!-- 다다익선 구간/혜택 리스트 -->
|
|
|
|
|
|
|
|
<div class="panelContent">
|
|
<div class="panelContent">
|
|
|
- <ul class="notice">
|
|
|
|
|
- <li>구성상품 등록시 기본값
|
|
|
|
|
- <!-- 아이콘 툴팁 -->
|
|
|
|
|
- <div class="iconTooltip">
|
|
|
|
|
- <i class="fa fa-info" aria-hidden="true"></i>
|
|
|
|
|
- <span class="left" style="width:400px; text-align:left;">
|
|
|
|
|
- <!-- class="left" 또는 class="right" -->
|
|
|
|
|
- - 상품상태 : 정보부족<br/>
|
|
|
|
|
- - 정상가 : 구성상품의 정상가 합<br/>
|
|
|
|
|
- - 판매가 : 구성상품 판매가 입력값의 합<br/>
|
|
|
|
|
- - 브랜드코드 : 구성상품의 기준여부 'Y'상품의 브랜드코드<br/>
|
|
|
|
|
- - 품목코드 : 구성상품의 기준여부 'Y'상품의 품목코드<br/>
|
|
|
|
|
- - 포인트 : 구성상품의 기준여부 'Y'상품의 브랜드 포인트<br/>
|
|
|
|
|
- - 배송비정책 : 구성상품의 기준여부 'Y'상품의 브랜드 배송비정책<br/>
|
|
|
|
|
- </span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <!-- //아이콘 툴팁 -->
|
|
|
|
|
- </li>
|
|
|
|
|
- </ul>
|
|
|
|
|
<table class="frmStyle">
|
|
<table class="frmStyle">
|
|
|
<colgroup>
|
|
<colgroup>
|
|
|
<col width="10%"/>
|
|
<col width="10%"/>
|
|
@@ -82,11 +63,11 @@
|
|
|
~
|
|
~
|
|
|
<input type="text" class="schDate w100" name="tmtbEddt" maxlength="10" required="required" data-valid-name="종료일자"/>
|
|
<input type="text" class="schDate w100" name="tmtbEddt" maxlength="10" required="required" data-valid-name="종료일자"/>
|
|
|
</td>
|
|
</td>
|
|
|
- <th>상태</th>
|
|
|
|
|
|
|
+ <th>상태<em class="required" title="필수"></em></th>
|
|
|
<td>
|
|
<td>
|
|
|
<!-- 상태 입력 : before
|
|
<!-- 상태 입력 : before
|
|
|
<input class="w50p" type="text" id="disTmtbStat" name="disTmtbStat" maxlength="30" th:value="${params.tmtbStat}" disabled=""/>-->
|
|
<input class="w50p" type="text" id="disTmtbStat" name="disTmtbStat" maxlength="30" th:value="${params.tmtbStat}" disabled=""/>-->
|
|
|
- <label class="rdoBtn" th:if="${tmtbStatList}" th:each="oneData, status : ${tmtbStatList}" ><input type="radio" id="disTmtbStat" name="disTmtbStat" th:value="${oneData.cd}" th:text="${oneData.cdNm}" /></label>
|
|
|
|
|
|
|
+ <label class="rdoBtn" th:if="${tmtbStatList}" th:each="oneData, status : ${tmtbStatList}" ><input type="radio" id="disTmtbStat" name="disTmtbStat" th:value="${oneData.cd}" th:text="${oneData.cdNm}" required="required" data-valid-name="상태"/></label>
|
|
|
<input type="hidden" id="tmtbStat" name="tmtbStat"/>
|
|
<input type="hidden" id="tmtbStat" name="tmtbStat"/>
|
|
|
</td>
|
|
</td>
|
|
|
</tr>
|
|
</tr>
|
|
@@ -310,8 +291,8 @@
|
|
|
{width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
|
|
{width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
|
|
|
{headerName: "공급처ID", field: "supplyCompCd", width: 120, cellClass: 'text-center'},
|
|
{headerName: "공급처ID", field: "supplyCompCd", width: 120, cellClass: 'text-center'},
|
|
|
{headerName: "공급업체명", field: "supplyCompNm", width: 150, cellClass: 'text-center'},
|
|
{headerName: "공급업체명", field: "supplyCompNm", width: 150, cellClass: 'text-center'},
|
|
|
- {headerName: "적용대상", field: "targetGb", width: 150, cellClass: 'text-center'},
|
|
|
|
|
- {headerName: "시퀀스", field: "tmtbGoodsSq", width: 150, cellClass: 'text-center'}
|
|
|
|
|
|
|
+ {headerName: "적용대상", field: "targetGb", width: 150, cellClass: 'text-center', hide: true},
|
|
|
|
|
+ {headerName: "시퀀스", field: "tmtbGoodsSq", width: 150, cellClass: 'text-center', hide: true}
|
|
|
];
|
|
];
|
|
|
// 브랜드 리스트 설정
|
|
// 브랜드 리스트 설정
|
|
|
var columnBrandList = [
|
|
var columnBrandList = [
|
|
@@ -319,8 +300,8 @@
|
|
|
{headerName: "브랜드ID", field: "brandCd", width: 120, cellClass: 'text-center'},
|
|
{headerName: "브랜드ID", field: "brandCd", width: 120, cellClass: 'text-center'},
|
|
|
{headerName: "브랜드명", field: "brandEnm", width: 120, cellClass: 'text-center'},
|
|
{headerName: "브랜드명", field: "brandEnm", width: 120, cellClass: 'text-center'},
|
|
|
{headerName: "공급업체명", field: "supplyCompNm", width: 150, cellClass: 'text-center'},
|
|
{headerName: "공급업체명", field: "supplyCompNm", width: 150, cellClass: 'text-center'},
|
|
|
- {headerName: "적용대상", field: "targetGb", width: 150, cellClass: 'text-center'},
|
|
|
|
|
- {headerName: "시퀀스", field: "tmtbGoodsSq", width: 150, cellClass: 'text-center'}
|
|
|
|
|
|
|
+ {headerName: "적용대상", field: "targetGb", width: 150, cellClass: 'text-center', hide: true},
|
|
|
|
|
+ {headerName: "시퀀스", field: "tmtbGoodsSq", width: 150, cellClass: 'text-center', hide: true}
|
|
|
];
|
|
];
|
|
|
// 적용상품 리스트 설정
|
|
// 적용상품 리스트 설정
|
|
|
var columnApplyGoodsList = [
|
|
var columnApplyGoodsList = [
|
|
@@ -331,11 +312,10 @@
|
|
|
valueFormatter: function (params) { return gagaAgGrid.lookupValue(applyGoodsGbList, params.value); },
|
|
valueFormatter: function (params) { return gagaAgGrid.lookupValue(applyGoodsGbList, params.value); },
|
|
|
valueParser: function (params) { return gagaAgGrid.lookupKey(applyGoodsGbList, params.newValue); }
|
|
valueParser: function (params) { return gagaAgGrid.lookupKey(applyGoodsGbList, params.newValue); }
|
|
|
},
|
|
},
|
|
|
- //{headerName: "상품구분", field: "goodsGb", width: 120, cellClass: 'text-center'},
|
|
|
|
|
- {headerName: "Product ID", field: "goodsCd", width: 120, cellClass: 'text-center'},
|
|
|
|
|
|
|
+ {headerName: "상품코드", field: "goodsCd", width: 120, cellClass: 'text-center'},
|
|
|
{headerName: "상품명", field: "goodsNm", width: 120, cellClass: 'text-center'},
|
|
{headerName: "상품명", field: "goodsNm", width: 120, cellClass: 'text-center'},
|
|
|
- {headerName: "적용대상", field: "targetGb", width: 150, cellClass: 'text-center'},
|
|
|
|
|
- {headerName: "시퀀스", field: "tmtbGoodsSq", width: 150, cellClass: 'text-center'}
|
|
|
|
|
|
|
+ {headerName: "적용대상", field: "targetGb", width: 150, cellClass: 'text-center', hide: true},
|
|
|
|
|
+ {headerName: "시퀀스", field: "tmtbGoodsSq", width: 150, cellClass: 'text-center', hide: true}
|
|
|
];
|
|
];
|
|
|
// 제외상품 리스트 설정
|
|
// 제외상품 리스트 설정
|
|
|
var columnExceptGoodsList = [
|
|
var columnExceptGoodsList = [
|
|
@@ -346,46 +326,52 @@
|
|
|
valueFormatter: function (params) { return gagaAgGrid.lookupValue(exceptGoodsGbList, params.value); },
|
|
valueFormatter: function (params) { return gagaAgGrid.lookupValue(exceptGoodsGbList, params.value); },
|
|
|
valueParser: function (params) { return gagaAgGrid.lookupKey(exceptGoodsGbList, params.newValue); }
|
|
valueParser: function (params) { return gagaAgGrid.lookupKey(exceptGoodsGbList, params.newValue); }
|
|
|
},
|
|
},
|
|
|
- {headerName: "Product ID", field: "goodsCd", width: 120, cellClass: 'text-center'},
|
|
|
|
|
|
|
+ {headerName: "상품코드", field: "goodsCd", width: 120, cellClass: 'text-center'},
|
|
|
{headerName: "상품명", field: "goodsNm", width: 120, cellClass: 'text-center'},
|
|
{headerName: "상품명", field: "goodsNm", width: 120, cellClass: 'text-center'},
|
|
|
- {headerName: "적용대상", field: "targetGb", width: 150, cellClass: 'text-center'},
|
|
|
|
|
- {headerName: "시퀀스", field: "tmtbGoodsSq", width: 150, cellClass: 'text-center'}
|
|
|
|
|
- /*{headerName: "Product ID", field: "goodsCd", width: 120, cellClass: 'text-center'},
|
|
|
|
|
- {headerName: "브랜드명", field: "brandEnm", width: 150, cellClass: 'text-center'},
|
|
|
|
|
- {headerName: "상품명", field: "goodsNm", width: 120, cellClass: 'text-center'},
|
|
|
|
|
- {headerName: "판매상태", field: "goodsStat" , width: 120, cellClass: 'text-center',
|
|
|
|
|
- cellEditorParams: { values: gagaAgGrid.extractValues(FGAddGoodsStatList) },
|
|
|
|
|
- valueFormatter: function (params) { return gagaAgGrid.lookupValue(FGAddGoodsStatList, params.value); },
|
|
|
|
|
- valueParser: function (params) { return gagaAgGrid.lookupKey(FGAddGoodsStatList, params.newValue); }
|
|
|
|
|
- },
|
|
|
|
|
- {headerName: "정상가", field: "listPrice", width: 120, cellClass: 'text-center',valueFormatter: function(params) {return params.value.addComma();}},
|
|
|
|
|
- {headerName: "판매가", field: "currPrice", width: 120, cellClass: 'text-center',valueFormatter: function(params) {return params.value.addComma();}},
|
|
|
|
|
- {headerName: "적용대상", field: "targetGb", width: 150, cellClass: 'text-center'}*/
|
|
|
|
|
|
|
+ {headerName: "적용대상", field: "targetGb", width: 150, cellClass: 'text-center', hide: true},
|
|
|
|
|
+ {headerName: "시퀀스", field: "tmtbGoodsSq", width: 150, cellClass: 'text-center', hide: true}
|
|
|
];
|
|
];
|
|
|
|
|
|
|
|
// 업체분담율 리스트 설정
|
|
// 업체분담율 리스트 설정
|
|
|
var columnApplyBurdenList = [
|
|
var columnApplyBurdenList = [
|
|
|
{width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
|
|
{width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
|
|
|
{headerName: "업체ID", field: "tmtbSupplyCd" , width: 120, cellClass: 'text-center'},
|
|
{headerName: "업체ID", field: "tmtbSupplyCd" , width: 120, cellClass: 'text-center'},
|
|
|
- {headerName: "분담율(%)", field: "tmtbBurdenRate" , width: 120, cellClass: 'text-center',editable: true, required: true},
|
|
|
|
|
|
|
+ {headerName: "분담율(%)", field: "tmtbBurdenRate" , width: 120, cellClass: 'text-center',required: true
|
|
|
|
|
+ ,valueFormatter: function(params) {
|
|
|
|
|
+ if(params.value && params.value > 0) {
|
|
|
|
|
+ return params.value.addComma();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return '0';
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ cellEditor: 'textCellEditor',
|
|
|
|
|
+ cellEditorParams: { maxlength: 3, validType: 'numeric'}
|
|
|
|
|
+ },
|
|
|
{headerName: "사용여부", field: "useYn" , width: 120, cellClass: 'text-center'},
|
|
{headerName: "사용여부", field: "useYn" , width: 120, cellClass: 'text-center'},
|
|
|
- {headerName: "시퀀스", field: "tmtbBurdenSq", width: 150, cellClass: 'text-center'}
|
|
|
|
|
|
|
+ {headerName: "시퀀스", field: "tmtbBurdenSq", width: 150, cellClass: 'text-center', hide: true}
|
|
|
];
|
|
];
|
|
|
|
|
|
|
|
// 구간 할인/혜택 설정
|
|
// 구간 할인/혜택 설정
|
|
|
var columnSectionGbList = [
|
|
var columnSectionGbList = [
|
|
|
{width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
|
|
{width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
|
|
|
{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
|
|
{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
|
|
|
- {headerName: "시퀀스", field: "tmtbSq", width: 100, cellClass: 'text-center'},
|
|
|
|
|
|
|
+ {headerName: "시퀀스", field: "tmtbSq", width: 100, cellClass: 'text-center', hide: true},
|
|
|
{headerName: "할인구간", field: "sectionGb", width: 100, cellClass: 'text-center',
|
|
{headerName: "할인구간", field: "sectionGb", width: 100, cellClass: 'text-center',
|
|
|
cellEditor: 'agRichSelectCellEditor',
|
|
cellEditor: 'agRichSelectCellEditor',
|
|
|
cellEditorParams: { values: gagaAgGrid.extractValues(sectionGbList), required: true },
|
|
cellEditorParams: { values: gagaAgGrid.extractValues(sectionGbList), required: true },
|
|
|
valueFormatter: function (params) { return gagaAgGrid.lookupValue(sectionGbList, params.value); },
|
|
valueFormatter: function (params) { return gagaAgGrid.lookupValue(sectionGbList, params.value); },
|
|
|
valueParser: function (params) { return gagaAgGrid.lookupKey(sectionGbList, params.newValue); }
|
|
valueParser: function (params) { return gagaAgGrid.lookupKey(sectionGbList, params.newValue); }
|
|
|
},
|
|
},
|
|
|
- {headerName: "구간값", field: "sectionVal", width: 100, cellClass: 'text-right',
|
|
|
|
|
|
|
+ {headerName: "구간값", field: "sectionVal", width: 100, cellClass: 'text-right', required: true
|
|
|
|
|
+ ,valueFormatter: function(params) {
|
|
|
|
|
+ if(params.value && params.value > 0) {
|
|
|
|
|
+ return params.value.addComma();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return '0';
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
cellEditor: 'textCellEditor',
|
|
cellEditor: 'textCellEditor',
|
|
|
- cellEditorParams: { maxlength: 50, required: true }
|
|
|
|
|
|
|
+ cellEditorParams: { maxlength: 14, validType: 'numeric'}
|
|
|
},
|
|
},
|
|
|
{headerName: "할인구분", field: "dcWay", width: 100, cellClass: 'text-center',
|
|
{headerName: "할인구분", field: "dcWay", width: 100, cellClass: 'text-center',
|
|
|
cellEditor: 'agRichSelectCellEditor',
|
|
cellEditor: 'agRichSelectCellEditor',
|
|
@@ -393,12 +379,19 @@
|
|
|
valueFormatter: function (params) { return gagaAgGrid.lookupValue(dcWayList, params.value); },
|
|
valueFormatter: function (params) { return gagaAgGrid.lookupValue(dcWayList, params.value); },
|
|
|
valueParser: function (params) { return gagaAgGrid.lookupKey(dcWayList, params.newValue); }
|
|
valueParser: function (params) { return gagaAgGrid.lookupKey(dcWayList, params.newValue); }
|
|
|
},
|
|
},
|
|
|
- {headerName: "할인값", field: "dcVal", width: 100, cellClass: 'text-right',
|
|
|
|
|
|
|
+ {headerName: "할인값", field: "dcVal", width: 100, cellClass: 'text-right', required: true
|
|
|
|
|
+ ,valueFormatter: function(params) {
|
|
|
|
|
+ if(params.value && params.value > 0) {
|
|
|
|
|
+ return params.value.addComma();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return '0';
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
cellEditor: 'textCellEditor',
|
|
cellEditor: 'textCellEditor',
|
|
|
- cellEditorParams: { maxlength: 50, required: true }
|
|
|
|
|
|
|
+ cellEditorParams: { maxlength: 14, validType: 'numeric'}
|
|
|
},
|
|
},
|
|
|
- {headerName: "구간시퀀스", field: "tmtbSectionSq", width: 150, cellClass: 'text-center'},
|
|
|
|
|
- {headerName: "할인값시퀀스", field: "tmtbValSq", width: 150, cellClass: 'text-center'}
|
|
|
|
|
|
|
+ {headerName: "구간시퀀스", field: "tmtbSectionSq", width: 150, cellClass: 'text-center', hide: true},
|
|
|
|
|
+ {headerName: "할인값시퀀스", field: "tmtbValSq", width: 150, cellClass: 'text-center', hide: true}
|
|
|
];
|
|
];
|
|
|
|
|
|
|
|
// 공급업체 리스트 설정
|
|
// 공급업체 리스트 설정
|
|
@@ -464,6 +457,10 @@
|
|
|
|
|
|
|
|
// 수정 버튼 클릭시
|
|
// 수정 버튼 클릭시
|
|
|
$('#btnMorebetterUpdate').on('click', function() {
|
|
$('#btnMorebetterUpdate').on('click', function() {
|
|
|
|
|
+ // validation
|
|
|
|
|
+ if (!gagajf.validation('#moreBetterForm'))
|
|
|
|
|
+ return false;
|
|
|
|
|
+
|
|
|
// 행사기간 확인
|
|
// 행사기간 확인
|
|
|
let fromDate = $('#moreBetterForm input[name=tmtbStdt]').val();
|
|
let fromDate = $('#moreBetterForm input[name=tmtbStdt]').val();
|
|
|
let toDate = $('#moreBetterForm input[name=tmtbEddt]').val();
|
|
let toDate = $('#moreBetterForm input[name=tmtbEddt]').val();
|
|
@@ -480,10 +477,6 @@
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // validation
|
|
|
|
|
- if (!gagajf.validation('#moreBetterForm'))
|
|
|
|
|
- return false;
|
|
|
|
|
-
|
|
|
|
|
// disabled 값 넘겨주기
|
|
// disabled 값 넘겨주기
|
|
|
$('#moreBetterForm input[name=tmtbSq]').val($('#moreBetterForm input[name=disTmtbSq]').val());
|
|
$('#moreBetterForm input[name=tmtbSq]').val($('#moreBetterForm input[name=disTmtbSq]').val());
|
|
|
$('#moreBetterForm input[name=tmtbStat]').val($('input:radio[name="disTmtbStat"]:checked').val());
|
|
$('#moreBetterForm input[name=tmtbStat]').val($('input:radio[name="disTmtbStat"]:checked').val());
|
|
@@ -514,9 +507,9 @@
|
|
|
|
|
|
|
|
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() {
|
|
|
- //$('#btnSearch').trigger('click');
|
|
|
|
|
- //$('#btnNew').trigger('click');
|
|
|
|
|
- console.log('update 11111');
|
|
|
|
|
|
|
+ fnMorebetterFormClose();
|
|
|
|
|
+ $('#btnInit').trigger('click');
|
|
|
|
|
+ $('#btnSearch').trigger('click');
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
@@ -524,27 +517,9 @@
|
|
|
|
|
|
|
|
// 저장 버튼 클릭시
|
|
// 저장 버튼 클릭시
|
|
|
$('#btnMorebetterSave').on('click', function() {
|
|
$('#btnMorebetterSave').on('click', function() {
|
|
|
- // 각 ag-grid list 수량
|
|
|
|
|
- let supplyCompCnt = gagaAgGrid.selectedRowData(gridOptionsFGCompanyList).length;
|
|
|
|
|
- let brandCnt = gagaAgGrid.selectedRowData(gridOptionsFGBrandList).length;
|
|
|
|
|
- let applyGoodsCnt = gagaAgGrid.selectedRowData(gridOptionsFGApplyGoodsList).length;
|
|
|
|
|
- let exceptGoodsCnt = gagaAgGrid.selectedRowData(gridOptionsFGExceptGoodsList).length;
|
|
|
|
|
- let applyBurdenCnt = gagaAgGrid.selectedRowData(gridOptionsApplyBurdenList).length;
|
|
|
|
|
- let sectionGbCnt = gagaAgGrid.selectedRowData(gridOptionsSectionGbList).length;
|
|
|
|
|
- console.log('supplyCompCnt>>'+supplyCompCnt);
|
|
|
|
|
- console.log('brandCnt>>'+brandCnt);
|
|
|
|
|
- console.log('applyGoodsCnt>>'+applyGoodsCnt);
|
|
|
|
|
- console.log('exceptGoodsCnt>>'+exceptGoodsCnt);
|
|
|
|
|
- console.log('applyBurdenCnt>>'+applyBurdenCnt);
|
|
|
|
|
- console.log('sectionGbCnt>>'+sectionGbCnt);
|
|
|
|
|
- if(applyGoodsCnt < 1){
|
|
|
|
|
- mcxDialog.alert("선택된 적용상품이 없습니다.");
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- if(sectionGbCnt < 1){
|
|
|
|
|
- mcxDialog.alert("선택된 할인구간이 없습니다.");
|
|
|
|
|
|
|
+ // validation
|
|
|
|
|
+ if (!gagajf.validation('#moreBetterForm'))
|
|
|
return false;
|
|
return false;
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
// 행사기간 확인
|
|
// 행사기간 확인
|
|
|
let fromDate = $('#moreBetterForm input[name=tmtbStdt]').val();
|
|
let fromDate = $('#moreBetterForm input[name=tmtbStdt]').val();
|
|
@@ -562,10 +537,22 @@
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // 각 ag-grid list 수량
|
|
|
|
|
+ let supplyCompCnt = gagaAgGrid.selectedRowData(gridOptionsFGCompanyList).length;
|
|
|
|
|
+ let brandCnt = gagaAgGrid.selectedRowData(gridOptionsFGBrandList).length;
|
|
|
|
|
+ let applyGoodsCnt = gagaAgGrid.selectedRowData(gridOptionsFGApplyGoodsList).length;
|
|
|
|
|
+ let exceptGoodsCnt = gagaAgGrid.selectedRowData(gridOptionsFGExceptGoodsList).length;
|
|
|
|
|
+ let applyBurdenCnt = gagaAgGrid.selectedRowData(gridOptionsApplyBurdenList).length;
|
|
|
|
|
+ let sectionGbCnt = gagaAgGrid.selectedRowData(gridOptionsSectionGbList).length;
|
|
|
|
|
|
|
|
- // validation
|
|
|
|
|
- if (!gagajf.validation('#moreBetterForm'))
|
|
|
|
|
|
|
+ if(applyGoodsCnt < 1){
|
|
|
|
|
+ mcxDialog.alert("선택된 적용상품이 없습니다.");
|
|
|
return false;
|
|
return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(sectionGbCnt < 1){
|
|
|
|
|
+ mcxDialog.alert("선택된 할인구간이 없습니다.");
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
// disabled 값 넘겨주기
|
|
// disabled 값 넘겨주기
|
|
|
$('#moreBetterForm input[name=tmtbSq]').val($('#moreBetterForm input[name=disTmtbSq]').val());
|
|
$('#moreBetterForm input[name=tmtbSq]').val($('#moreBetterForm input[name=disTmtbSq]').val());
|
|
@@ -598,9 +585,9 @@
|
|
|
|
|
|
|
|
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() {
|
|
|
- //$('#btnSearch').trigger('click');
|
|
|
|
|
- //$('#btnNew').trigger('click');
|
|
|
|
|
- console.log('save 11111');
|
|
|
|
|
|
|
+ fnMorebetterFormClose();
|
|
|
|
|
+ $('#btnInit').trigger('click');
|
|
|
|
|
+ $('#btnSearch').trigger('click');
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|