mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-06 19:09:49 +09:00
발신번호 반려시 메일, 팝업 추가
This commit is contained in:
@@ -98,6 +98,7 @@
|
||||
<th>제출서류</th>
|
||||
<td class="sender">
|
||||
<a
|
||||
|
||||
href="javascript:void(0);"
|
||||
@click="download(item.filePath, item.fileNm, item.docTitle)"
|
||||
v-for="(item, idx) in docList"
|
||||
@@ -160,6 +161,28 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 사용자 수정 확인 -->
|
||||
<div class="dimmed confirm-update" @click="confirmUpdateClose();"></div>
|
||||
<div class="popup-wrap confirm-update">
|
||||
<div class="popup confirm-update">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">발신번호 저장 확인</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>발신번호 상태는 다음과 같습니다.</p>
|
||||
<br>
|
||||
<p>승인 건 : {{ apprCnt }}</p>
|
||||
<p>반려 건 : {{ rejtCnt }}</p>
|
||||
</div>
|
||||
<div v-if="reqSttusCd == '처리완료'"><br><p>이미 처리가 완료된 건입니다. 발신번호 상태를 저장하시겠습니까?</p></div>
|
||||
<div v-if="rejtCnt > 0"><br>*반려 건이 있을 시 사용자에게 메일이 전송됩니다.</div>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor" @click="confirmUpdate();">확인</button>
|
||||
<button class="btn-default" @click="confirmUpdateClose();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<common-modal ref="commmonModal"></common-modal>
|
||||
</div>
|
||||
</div>
|
||||
@@ -191,6 +214,9 @@ export default {
|
||||
memo: '',
|
||||
docList: [],
|
||||
numList: [],
|
||||
reqSttusCd: '',
|
||||
apprCnt: 0,
|
||||
rejtCnt: 0,
|
||||
};
|
||||
},
|
||||
components: {
|
||||
@@ -205,6 +231,31 @@ export default {
|
||||
this.formReset();
|
||||
},
|
||||
methods: {
|
||||
|
||||
|
||||
//사용자 수정 확인 Open
|
||||
confirmUpdateOpen() {
|
||||
var dimmed = document.getElementsByClassName('confirm-update');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
},
|
||||
//사용자 수정 확인
|
||||
confirmUpdate() {
|
||||
var dimmed = document.getElementsByClassName('confirm-update');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
this.doSave();
|
||||
},
|
||||
// 사용자 수정 Close
|
||||
confirmUpdateClose() {
|
||||
var dimmed = document.getElementsByClassName('confirm-update');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
},
|
||||
|
||||
//파일 다운로드
|
||||
download(filePath, fileName, docTitle) {
|
||||
this.row = {};
|
||||
@@ -225,6 +276,7 @@ export default {
|
||||
try {
|
||||
this.row.regReqNo = props.regReqNo;
|
||||
this.row.docNo = props.docNo;
|
||||
this.reqSttusCd = props.reqSttusCd;
|
||||
const response = await sendNumMgtApi.apprDetail(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == '0000') {
|
||||
@@ -258,6 +310,8 @@ export default {
|
||||
rejtCnt = rejtCnt + 1;
|
||||
}
|
||||
});
|
||||
this.apprCnt = apprCnt;
|
||||
this.rejtCnt = rejtCnt;
|
||||
/* if (apprCnt == this.numList.length) {
|
||||
this.$refs.apprRadio.checked = true;
|
||||
} else if (rejtCnt == this.numList.length) {
|
||||
@@ -299,6 +353,8 @@ export default {
|
||||
rejtCnt = rejtCnt + 1;
|
||||
}
|
||||
});
|
||||
this.apprCnt = apprCnt;
|
||||
this.rejtCnt = rejtCnt;
|
||||
/* if (apprCnt == this.numList.length) {
|
||||
this.$refs.apprRadio.checked = true;
|
||||
} else if (rejtCnt == this.numList.length) {
|
||||
@@ -306,7 +362,8 @@ export default {
|
||||
} */
|
||||
},
|
||||
updateSttus() {
|
||||
this.doSave();
|
||||
this.confirmUpdateOpen();
|
||||
// this.doSave();
|
||||
},
|
||||
async doSave() {
|
||||
this.row.memo = this.memo;
|
||||
|
||||
@@ -618,12 +618,6 @@ public class SendNumMgtService {
|
||||
|
||||
SendNumMgtMapper sendNumMgtMapper = sqlSessionMaster.getMapper(SendNumMgtMapper.class);
|
||||
|
||||
logger.debug("넘어오는 값 확인하기={}",updateApprReqDto);
|
||||
|
||||
String adminId = updateApprReqDto.getAdminId();
|
||||
|
||||
String userEmail = sendNumMgtMapper.selectUserEmailByAdminId(adminId);
|
||||
|
||||
Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
|
||||
UserDetails userDetails = (UserDetails) principal;
|
||||
String regId = userDetails.getUsername();
|
||||
@@ -657,12 +651,15 @@ public class SendNumMgtService {
|
||||
|
||||
//2. 반려 발신번호 리스트에 값이 있을 경우 메일을 보냄
|
||||
if(sndrNoList.size()>0) {
|
||||
// 3. 반려 발신번호 메일 대상 주소
|
||||
String adminId = updateApprReqDto.getAdminId();
|
||||
String userEmail = sendNumMgtMapper.selectUserEmailByAdminId(adminId);
|
||||
|
||||
//3. 발신번호 리스트 치환
|
||||
String SndrNoString = sndrNoList.toString();
|
||||
String re1 = SndrNoString.replace("[", "<br>");
|
||||
String re2 = re1.replace(", ","</br><br>");
|
||||
String re3 = re2.replace("]", "</br>");
|
||||
String SndrNoRe1 = SndrNoString.replace("[", "<br>");
|
||||
String SndrNoRe2 = SndrNoRe1.replace(", ","</br><br>");
|
||||
String SndrNoRe3 = SndrNoRe2.replace("]", "</br>");
|
||||
|
||||
// logger.debug("발신번호 리스트 스트링 ={}",re3);
|
||||
//try catch 처리하기
|
||||
@@ -675,7 +672,7 @@ public class SendNumMgtService {
|
||||
//3. 메일에 담을 내용 셋팅
|
||||
mailReqMap.put("applicationId", apiApplicationId);
|
||||
mailReqMap.put("authToken", apiAuthToken);
|
||||
mailReqMap.put("rejectListSndrNo", re3);
|
||||
mailReqMap.put("rejectListSndrNo", SndrNoRe3);
|
||||
mailReqMap.put("rejectHtml", updateApprReqDto.getMemo());
|
||||
//이메일 수신자 가져오는 쿼리
|
||||
mailReqMap.put("toEmail", userEmail);
|
||||
|
||||
Reference in New Issue
Block a user