diff --git a/WebContent/WEB-INF/view/approval/approvalDetail.jsp b/WebContent/WEB-INF/view/approval/approvalDetail.jsp
index 25bd17c..3416036 100644
--- a/WebContent/WEB-INF/view/approval/approvalDetail.jsp
+++ b/WebContent/WEB-INF/view/approval/approvalDetail.jsp
@@ -76,7 +76,7 @@ $(function(){
window.open(url, "", "width=1000,height=880");
}else if(targetType == "CONTRACT_ESTIMATE"){
url = "/contractMgmt/estimateRegistFormPopup.do?objId="+targetObjId+"&actionType=view";
- window.open(url, "", "width=650,height=400");
+ window.open(url, "", "width=1000,height=560");
}
});
diff --git a/WebContent/WEB-INF/view/contractMgmt/estimateList_new.jsp b/WebContent/WEB-INF/view/contractMgmt/estimateList_new.jsp
index f268a12..dfdf6c6 100644
--- a/WebContent/WEB-INF/view/contractMgmt/estimateList_new.jsp
+++ b/WebContent/WEB-INF/view/contractMgmt/estimateList_new.jsp
@@ -48,8 +48,8 @@ $(document).ready(function(){
//영업활동 등록 팝업
$(".btnRegist").click(function(){
- var popup_width = 650;
- var popup_height = 400;
+ var popup_width = 1000;
+ var popup_height = 560;
var params = "?actionType=regist"
var url = "/contractMgmt/estimateRegistFormPopup.do"+params;
//window.open("/ordermgmt/ordermgmtUpdateFormPopup.do"+params, "", "width=650, height=750","menubars=no, scrollbars=yes, resizable=yes");
@@ -148,6 +148,48 @@ $(document).ready(function(){
}
});
+ // 메일발송
+ $("#btnMail").click(function(){
+ var selectedData = _tabulGrid.getSelectedData();
+ if(selectedData.length < 1){
+ Swal.fire("메일발송할 행을 선택해주십시오.");
+ return false;
+ } else if(selectedData.length > 1){
+ Swal.fire("한번에 한개의 견적서만 발송 가능합니다.");
+ return false;
+ } else {
+ var apprStatus = fnc_checkNull(selectedData[0].APPR_STATUS);
+ var objId = fnc_checkNull(selectedData[0].OBJID);
+ var estStatus = fnc_checkNull(selectedData[0].EST_STATUS);
+
+ // 결재완료 상태 확인
+ if(apprStatus !== "결재완료"){
+ Swal.fire("결재완료된 견적서만 발송 가능합니다.");
+ return false;
+ }
+
+ // 견적서 존재 여부 확인
+ if(estStatus === "0" || estStatus === 0){
+ Swal.fire("작성된 견적서가 없습니다.");
+ return false;
+ }
+
+ // 메일 발송 확인
+ Swal.fire({
+ title: '견적서 메일 발송',
+ text: "최종 차수의 견적서를 PDF로 발송하시겠습니까?",
+ icon: 'question',
+ showCancelButton: true,
+ confirmButtonText: '발송',
+ cancelButtonText: '취소'
+ }).then((result) => {
+ if(result.isConfirmed){
+ fn_sendEstimateMail(objId);
+ }
+ });
+ }
+ });
+
fn_search();
});
@@ -198,13 +240,35 @@ var columns = [
fn_showEstimateList(objid);
}
},
- {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '결재상태', field : 'APPR_STATUS',
- formatter:fnc_createGridAnchorTag,
- cellClick:function(e, cell){
- var objid = fnc_checkNull(cell.getData().OBJID);
- fn_projectConceptDetail(objid);
- }
- },
+ {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '결재상태', field : 'APPR_STATUS',
+ formatter:fnc_createGridAnchorTag,
+ cellClick:function(e, cell){
+ var APPROVAL_OBJID = fnc_checkNull(cell.getData().APPROVAL_OBJID);
+ var ROUTE_OBJID = fnc_checkNull(cell.getData().ROUTE_OBJID);
+ approval_form(APPROVAL_OBJID,ROUTE_OBJID);
+ }
+ },
+ {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '메일발송', field : 'MAIL_SEND_STATUS',
+ formatter: function(cell, formatterParams, onRendered){
+ var status = fnc_checkNull(cell.getValue());
+ var sendDate = fnc_checkNull(cell.getData().MAIL_SEND_DATE);
+
+ if(status === 'Y'){
+ return '발송완료';
+ } else if(status === 'N'){
+ return '발송실패';
+ } else {
+ return '미발송';
+ }
+// if(status === 'Y'){
+// return '발송완료
' + sendDate + '';
+// } else if(status === 'N'){
+// return '발송실패
' + sendDate + '';
+// } else {
+// return '미발송';
+// }
+ }
+ },
{headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '견적단가', field : 'EST_PRICE' },
{headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '견적공급가액', field : 'EST_SUPPLY_PRICE' },
{headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '환종', field : 'CONTRACT_CURRENCY_NAME' },
@@ -358,8 +422,8 @@ function fn_FileRegist(objId, docType, docTypeName){
}
//영업활동등록 상세
function fn_projectConceptDetail(objId){
- var popup_width = 650;
- var popup_height = 400;
+ var popup_width = 1000;
+ var popup_height = 560;
var url = "/contractMgmt/estimateRegistFormPopup.do?objId="+objId;
fn_centerPopup(popup_width, popup_height, url);
@@ -382,7 +446,7 @@ function fn_showEstimateList(contractObjId){
data: { objId: contractObjId },
dataType: "json",
success: function(data){
- console.log("견적서 목록 응답:", data); // 디버깅용
+ //console.log("견적서 목록 응답:", data); // 디버깅용
if(data.result === "success" && data.list && data.list.length > 0){
var html = '