|
|
@@ -3,7 +3,7 @@
|
|
|
xmlns:th="http://www.thymeleaf.org">
|
|
|
<!--
|
|
|
*******************************************************************************
|
|
|
- * @source : GoodsInstockAlarmForm.html
|
|
|
+ * @source : GoodsReinboundInformForm.html
|
|
|
* @desc : 재입고알림관리
|
|
|
*============================================================================
|
|
|
* PASTEL
|
|
|
@@ -22,7 +22,7 @@
|
|
|
<!-- 메뉴 설명 -->
|
|
|
<div class="infoBox menu-desc">
|
|
|
</div>
|
|
|
- <form id="searchForm" name="searchForm" action="#" th:action="@{'/goods/inStockAlarm/list'}">
|
|
|
+ <form id="searchForm" name="searchForm" action="#" th:action="@{'/goods/reinbound/inform/list'}">
|
|
|
<input type="hidden" id="searchGb" name="searchGb" />
|
|
|
<!-- 패널 영역1 -->
|
|
|
<div class="panelStyle" >
|
|
|
@@ -116,7 +116,7 @@
|
|
|
<!-- 상단버튼 영역 -->
|
|
|
<ul class="panelBar">
|
|
|
<li class="right">
|
|
|
- <button type="button" class="btn btn-primary btn-lg" id="inStockAlarmSend">재입고알림 발송</button>
|
|
|
+ <button type="button" class="btn btn-primary btn-lg" id="reinboundInformSend">재입고알림 발송</button>
|
|
|
검색결과 : <strong><span id="gridRowTotalCount">0</span> 건</strong>
|
|
|
쪽번호 <span id="pgNo">0</span>/ <strong id="endPgNo">0</strong>
|
|
|
<select id="pageSize" name="pageSize">
|
|
|
@@ -172,7 +172,7 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- {headerName: "상품코드", field: "goodsCd", width: 140, cellClass: 'text-center'},
|
|
|
+ {headerName: "상품코드", field: "goodsCd", width: 130, cellClass: 'text-center'},
|
|
|
{headerName: "상품명", field: "goodsNm", width: 200, cellClass: 'text-left'
|
|
|
,cellRenderer: function(params) {
|
|
|
return '<a href="javascript:void(0);">' + params.value + '</a>';
|
|
|
@@ -183,14 +183,14 @@
|
|
|
valueFormatter: function (params) { return gagaAgGrid.lookupValue(goodsStatList, params.value); },
|
|
|
valueParser: function (params) { return gagaAgGrid.lookupKey(goodsStatList, params.newValue); }
|
|
|
},
|
|
|
- {headerName: "색상명", field: "optCd1", width: 130, cellClass: 'text-center'},
|
|
|
- {headerName: "사이즈", field: "optCd2" , width: 130, cellClass: 'text-center'},
|
|
|
- {headerName: "가용재고", field: "currStockQty" , width: 100, cellClass: 'text-center'},
|
|
|
+ {headerName: "색상명", field: "optCd1", width: 100, cellClass: 'text-center'},
|
|
|
+ {headerName: "사이즈", field: "optCd2" , width: 100, cellClass: 'text-center'},
|
|
|
+ {headerName: "가용재고", field: "currStockQty" , width: 80, cellClass: 'text-center'},
|
|
|
{headerName: "고객ID", field: "custId" , width: 100, cellClass: 'text-center'},
|
|
|
{headerName: "고객명", field: "custNm" , width: 100, cellClass: 'text-center'},
|
|
|
- {headerName: "알림요청일시", field: "regDt", width: 120, cellClass: 'text-center',
|
|
|
+ {headerName: "알림요청일시", field: "reqDt", width: 120, cellClass: 'text-center',
|
|
|
cellRenderer: function(params) {
|
|
|
- return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD") : '';
|
|
|
+ return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDD").format("YYYY-MM-DD") : '';
|
|
|
}
|
|
|
},
|
|
|
{headerName: "알림 발송일시", field: "informDt", width: 120, cellClass: 'text-center',
|
|
|
@@ -243,11 +243,11 @@
|
|
|
// 조회클릭시
|
|
|
$('#btnSearch').on('click', function() {
|
|
|
$("#searchForm input[name=pageNo]").val('1');
|
|
|
- fnInStockAlarmListSearch();
|
|
|
+ fnReinboundInformListSearch();
|
|
|
});
|
|
|
|
|
|
// 조회
|
|
|
- var fnInStockAlarmListSearch = function(gbn) {
|
|
|
+ var fnReinboundInformListSearch = function(gbn) {
|
|
|
|
|
|
$("#searchForm input[name=searchGb]").val("BASIC");
|
|
|
|
|
|
@@ -330,7 +330,7 @@
|
|
|
$("#cateNo").val(val);
|
|
|
}
|
|
|
}
|
|
|
- debugger;
|
|
|
+
|
|
|
$("#searchForm input[name=selLvl]").val(selLvl);
|
|
|
$("#searchForm input[name=searchGb]").val("BASIC");
|
|
|
gagajf.ajaxFormSubmit('/display/category/list', "#searchForm", fnChangeCategory);
|
|
|
@@ -368,14 +368,14 @@
|
|
|
$('#searchForm').find('#pageNo').val(result.pageing.pageable.pageNo.addComma());
|
|
|
$('#searchForm').find('#pgNo').html(result.pageing.pageable.pageNo.addComma());
|
|
|
$('#searchForm').find('#endPgNo').html(result.pageing.pageable.totalPage.addComma());
|
|
|
- gridOptions.api.setRowData(result.inStockAlarmList);
|
|
|
+ gridOptions.api.setRowData(result.reinboundInformList);
|
|
|
gagaPaging.createPagination(result.pageing.pageable);
|
|
|
}
|
|
|
|
|
|
//페이징
|
|
|
$('#searchForm select[name=pageSize]').on('change', function() {
|
|
|
$("#searchForm input[name=pageNo]").val('1');
|
|
|
- fnInStockAlarmListSearch($("#searchForm input[name=searchGb]").val());
|
|
|
+ fnReinboundInformListSearch($("#searchForm input[name=searchGb]").val());
|
|
|
});
|
|
|
|
|
|
//업체변경시
|
|
|
@@ -391,8 +391,7 @@
|
|
|
});
|
|
|
|
|
|
// 재입고알림 발송
|
|
|
- $('#inStockAlarmSend').click(function(e) {
|
|
|
- //상품선택여부 확인처리 추가
|
|
|
+ $('#reinboundInformSend').click(function(e) {
|
|
|
var selectedData = gridOptions.api.getSelectedRows();
|
|
|
|
|
|
if (selectedData.length == 0) {
|
|
|
@@ -400,13 +399,17 @@
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- var arrInstockAlarmSq = [];
|
|
|
+ //var toDateStr = new Date().format("YYYYMMDD");
|
|
|
+ var date = new Date();
|
|
|
+ var beforeDay = date.before(0, 0, 15).format("YYYYMMDD");
|
|
|
+
|
|
|
+ var arrRinbdInfoSq = [];
|
|
|
var chkFlag = false;
|
|
|
$.each(selectedData, function(idx, item) {
|
|
|
|
|
|
- if (item.alarmYn == "Y"){
|
|
|
+ if (!gagajf.isNull(item.informDt)){
|
|
|
chkFlag = true;
|
|
|
- mcxDialog.alert(item.goodsCd +"상품은 이미 재입고알림 발송되었습니다.");
|
|
|
+ mcxDialog.alert(item.custId+'('+ item.custNm+ ') 의 ' + item.goodsCd +"상품은 이미 재입고알림 발송되었습니다.");
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
@@ -415,8 +418,14 @@
|
|
|
mcxDialog.alert(item.goodsCd +"상품( 사이즈 : " + item.sizeNm + " )은 가용재고가 없습니다.");
|
|
|
return false;
|
|
|
}
|
|
|
-
|
|
|
- arrInstockAlarmSq.push(item.instockAlarmSq);
|
|
|
+
|
|
|
+ if (beforeDay > item.reqDt){
|
|
|
+ chkFlag = true;
|
|
|
+ mcxDialog.alert("요청일이 15일경과한 재입고알림은 발송할 수 없습니다.");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ arrRinbdInfoSq.push(item.rinbdInfoSq);
|
|
|
});
|
|
|
|
|
|
if (chkFlag){
|
|
|
@@ -427,18 +436,18 @@
|
|
|
cancelBtnText: "취소",
|
|
|
sureBtnText: "확인",
|
|
|
sureBtnClick: function(){
|
|
|
- var data = {arrInstockAlarmSq : arrInstockAlarmSq
|
|
|
+ var data = {arrRinbdInfoSq : arrRinbdInfoSq
|
|
|
};
|
|
|
|
|
|
var jsonData = JSON.stringify(data);
|
|
|
- gagajf.ajaxJsonSubmit('/goods/inStockAlarm/send', jsonData, fnSendInstockCallBack);
|
|
|
+ gagajf.ajaxJsonSubmit('/goods/reinbound/inform/send', jsonData, fnSendInstockCallBack);
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
|
|
|
// 재입고알림 발송 콜백
|
|
|
var fnSendInstockCallBack = function(){
|
|
|
- fnInStockAlarmListSearch();
|
|
|
+ fnReinboundInformListSearch();
|
|
|
}
|
|
|
|
|
|
$(document).ready(function() {
|