|
@@ -121,6 +121,7 @@
|
|
|
<button type="button" class="btn btn-success btn-lg" id="btnGoodsExcelSave" th:if="${sessionInfo.roleCd == 'G001_0000' OR sessionInfo.roleCd == 'G001_A000' OR sessionInfo.roleCd == 'G001_A101' OR sessionInfo.roleCd == 'G001_A100' OR sessionInfo.roleCd == 'G001_A001'}">상품가격예약등록</button>
|
|
<button type="button" class="btn btn-success btn-lg" id="btnGoodsExcelSave" th:if="${sessionInfo.roleCd == 'G001_0000' OR sessionInfo.roleCd == 'G001_A000' OR sessionInfo.roleCd == 'G001_A101' OR sessionInfo.roleCd == 'G001_A100' OR sessionInfo.roleCd == 'G001_A001'}">상품가격예약등록</button>
|
|
|
<button type="button" class="btn btn-success btn-lg" id="btnGoodsPriceResSave">예약등록</button>
|
|
<button type="button" class="btn btn-success btn-lg" id="btnGoodsPriceResSave">예약등록</button>
|
|
|
<button type="button" class="btn btn-danger btn-lg" id="btnGoodsPriceResDelete">예약삭제</button>
|
|
<button type="button" class="btn btn-danger btn-lg" id="btnGoodsPriceResDelete">예약삭제</button>
|
|
|
|
|
+ <button type="button" class="btn btn-danger btn-lg" id="btnGoodsPriceResClose">종료</button>
|
|
|
</li>
|
|
</li>
|
|
|
<li class="right">
|
|
<li class="right">
|
|
|
검색결과 : <strong><span id="gridRowTotalCount">0</span> 건</strong>
|
|
검색결과 : <strong><span id="gridRowTotalCount">0</span> 건</strong>
|
|
@@ -567,6 +568,73 @@
|
|
|
fnGoodsPriceSearch("EXCELRESULT");
|
|
fnGoodsPriceSearch("EXCELRESULT");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ //종료처리 21.11.15 추가
|
|
|
|
|
+ $('#btnGoodsPriceResClose').click(function(e) {
|
|
|
|
|
+ //상품선택여부 확인처리 추가
|
|
|
|
|
+ var selectedData = gridOptions.api.getSelectedRows();
|
|
|
|
|
+
|
|
|
|
|
+ if (selectedData.length == 0) {
|
|
|
|
|
+ mcxDialog.alert('선택된 행이 없습니다.');
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ var arrGoodsCd = [];
|
|
|
|
|
+ var arrGoodsPriceResSq = [];
|
|
|
|
|
+ var chkFlag = false;
|
|
|
|
|
+ //selectedData = gagaAgGrid.getAllRowData(gridOptions);
|
|
|
|
|
+ $.each(selectedData, function(idx, item) {
|
|
|
|
|
+
|
|
|
|
|
+ if (gagajf.isNull(item.goodsPriceResSq) || item.goodsPriceResSq == "0"){
|
|
|
|
|
+ chkFlag = true;
|
|
|
|
|
+ mcxDialog.alert(item.goodsCd +"상품은 가격이 예약된 상품이 아닙니다.");
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ var toDateStr = new Date().format("YYYYMMDDHHmmss");
|
|
|
|
|
+ if (toDateStr > item.applyEddt){
|
|
|
|
|
+ chkFlag = true;
|
|
|
|
|
+ mcxDialog.alertC("종료된 예약 상품은 종료할 수 없습니다.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $('#goodsRsvtTnmForm input[name=applyEdYMD]').focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /*if ((toDateStr > item.applyStdt)){
|
|
|
|
|
+ chkFlag = true;
|
|
|
|
|
+ mcxDialog.alertC("시작된 예약 상품은 삭제할 수 없습니다.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $('#goodsRsvtTnmForm input[name=applyEdYMD]').focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }*/
|
|
|
|
|
+
|
|
|
|
|
+ arrGoodsCd.push(item.goodsCd);
|
|
|
|
|
+ arrGoodsPriceResSq.push(item.goodsPriceResSq);
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ if (chkFlag){
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ mcxDialog.confirm('종료하시겠습니까?', {
|
|
|
|
|
+ cancelBtnText: "취소",
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function(){
|
|
|
|
|
+ var data = {arrGoodsCd : arrGoodsCd
|
|
|
|
|
+ ,arrGoodsPriceResSq : arrGoodsPriceResSq
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ var jsonData = JSON.stringify(data);
|
|
|
|
|
+ gagajf.ajaxJsonSubmit('/goods/price/reserve/close', jsonData, fnGoodsPriceResDeleteCollBack);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
$(document).ready(function() {
|
|
$(document).ready(function() {
|
|
|
|
|
|
|
|
cfnCreateCalendar('#sellTerms', 'applyStdt', 'applyEddt', true, '예약일', 'X');
|
|
cfnCreateCalendar('#sellTerms', 'applyStdt', 'applyEddt', true, '예약일', 'X');
|