mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 02:59:22 +09:00
리스크관리 / 발송통계 추가
This commit is contained in:
@@ -53,12 +53,14 @@
|
||||
</table>
|
||||
</form>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor" @click="doInsert">등록</button>
|
||||
<button class="btn-pcolor" @click="regisConfirm()">등록</button>
|
||||
<button class="btn-default" @click="ModalClose();">취소</button>
|
||||
</div>
|
||||
<common-modal ref="commmonModal"></common-modal>
|
||||
</div>
|
||||
</div>
|
||||
<common-modal ref="commonModal"></common-modal>
|
||||
<validation-confirm-popup ref="ValidationConfirmPopup"></validation-confirm-popup>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
@@ -66,12 +68,14 @@
|
||||
import api from '@/service/api';
|
||||
import riskMgtApi from '../service/riskMgtApi'
|
||||
import { utils_mixin, chkPattern2 } from '../service/mixins';
|
||||
import commonModal from "@/components/modal/commonModal";
|
||||
import lodash from "lodash";
|
||||
import commonModal from "@/components/modal/commonModal";
|
||||
import ValidationConfirmPopup from './ValidationConfirmPopup.vue';
|
||||
export default {
|
||||
mixins: [utils_mixin, chkPattern2],
|
||||
data(){
|
||||
return{
|
||||
props : {},
|
||||
row: {},
|
||||
rsnType: [],
|
||||
tpType: [],
|
||||
@@ -95,7 +99,8 @@ export default {
|
||||
},
|
||||
components: {
|
||||
commonModal,
|
||||
},
|
||||
ValidationConfirmPopup
|
||||
},
|
||||
methods :{
|
||||
//모달 띄우기
|
||||
ModalOpen(){
|
||||
@@ -119,27 +124,28 @@ export default {
|
||||
|
||||
},
|
||||
// 저장 후 부모창 호출
|
||||
toComplete(){
|
||||
toComplete(){z
|
||||
this.$parent.$refs.table.reloadData();
|
||||
this.ModalClose();
|
||||
},
|
||||
async doInsert(){
|
||||
if(this.doValidate() && window.confirm('등록 하시겠습니까?')){
|
||||
// if(this.doValidate() && this.regisConfirm()){
|
||||
try {
|
||||
const response = await riskMgtApi.insertIntrcp(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '저장 하였습니다.';
|
||||
console.log(this.row);
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.row.title = '발신번호 차단';
|
||||
this.row.msg1 = '성공 하였습니다.';
|
||||
this.$parent.alertInsert(this.row);
|
||||
this.toComplete();
|
||||
}
|
||||
} catch(err) {
|
||||
console.log(err);
|
||||
alert("실패 하였습니다.");
|
||||
this.row.title = '발신번호 차단';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$parent.alertInsert(this.row);
|
||||
}
|
||||
}
|
||||
// }
|
||||
},
|
||||
setCodeDate(){
|
||||
// 발송타입
|
||||
@@ -153,18 +159,17 @@ export default {
|
||||
|
||||
doValidate(){
|
||||
if(this.isNull(this.blckSndrno)){
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '저장 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.row.title = '발신번호 차단';
|
||||
this.row.msg1 = '발신번호를 입력해주세요.';
|
||||
this.$parent.alertInsert(this.row);
|
||||
this.$refs._blckSndrno.focus();
|
||||
return false;
|
||||
}
|
||||
const hp = this.blckSndrno;
|
||||
if(!this.isNull(hp) && !this.isMobile(hp)){
|
||||
alert("발신번호 형식이 잘못되었습니다. 확인 해주세요.");
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '저장 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.row.title = '발신번호 차단';
|
||||
this.row.msg1 = '발신번호 형식이 잘못되었습니다. 확인 해주세요.';
|
||||
this.$parent.alertInsert(this.row)
|
||||
this.$refs._blckSndrno.focus();
|
||||
return false;
|
||||
}
|
||||
@@ -179,8 +184,13 @@ export default {
|
||||
Object.assign(this.$data, this.$options.data());
|
||||
this.insertType = type;
|
||||
},
|
||||
|
||||
regisConfirm(){
|
||||
if(this.doValidate()){
|
||||
this.$refs.ValidationConfirmPopup.confirmInsertOpen();
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -61,10 +61,11 @@
|
||||
</table>
|
||||
</form>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor" @click="doInsert">저장</button>
|
||||
<button class="btn-pcolor" @click="regisConfirm()">저장</button>
|
||||
<button class="btn-default" @click="ModalClose();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
<validation-confirm-popup ref="ValidationConfirmPopup"></validation-confirm-popup>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -74,6 +75,7 @@ import api from '@/service/api';
|
||||
import riskMgtApi from '../service/riskMgtApi';
|
||||
import lodash from "lodash";
|
||||
import { utils_mixin, chkPattern2 } from '../service/mixins';
|
||||
import ValidationConfirmPopup from './ValidationConfirmPopup.vue';
|
||||
export default {
|
||||
mixins: [utils_mixin, chkPattern2],
|
||||
data(){
|
||||
@@ -84,7 +86,6 @@ export default {
|
||||
// word:'',
|
||||
// },
|
||||
msgBlckwordList: [
|
||||
{ seqNo: '' , word : '도박'},
|
||||
// { word : '스팸'},
|
||||
],
|
||||
rsnType: [],
|
||||
@@ -106,6 +107,9 @@ export default {
|
||||
created(){
|
||||
this.formReset();
|
||||
},
|
||||
components: {
|
||||
ValidationConfirmPopup
|
||||
},
|
||||
|
||||
methods :{
|
||||
ModalOpen(){
|
||||
@@ -141,22 +145,29 @@ export default {
|
||||
},
|
||||
|
||||
async doInsert(){
|
||||
if(this.doValidate() && window.confirm('등록 하시겠습니까?')){
|
||||
// if(this.doValidate() && window.confirm('등록 하시겠습니까?')){
|
||||
try {
|
||||
const response = await riskMgtApi.msgIntrcpList(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
alert('저장 하였습니다.');
|
||||
this.row.title = '메세지 차단';
|
||||
this.row.msg1 = '저장하였습니다.';
|
||||
this.$parent.msgAlertModalOpen(this.row);
|
||||
}
|
||||
this.toComplete();
|
||||
} catch(err) {
|
||||
alert("실패 하였습니다.");
|
||||
this.row.title = '메세지 차단';
|
||||
this.row.msg1 = '실패하였습니다.';
|
||||
this.$parent.msgAlertModalOpen(this.row);
|
||||
}
|
||||
}
|
||||
// }
|
||||
},
|
||||
|
||||
doValidate(){
|
||||
if(this.isNull(this.word)){
|
||||
if(this.isNull(this.msgBlckwordList)){
|
||||
this.row.title = '메세지 차단';
|
||||
this.row.msg1 = '문구를 입력해주세요.';
|
||||
this.$parent.msgAlertModalOpen(this.row);
|
||||
this.$refs._word.focus();
|
||||
return false;
|
||||
}
|
||||
@@ -176,6 +187,13 @@ export default {
|
||||
},
|
||||
//신규등록 팝업에서 문구 추가 버튼
|
||||
doAdd: function() {
|
||||
if(this.isNull(this.word)){
|
||||
this.row.title = '메세지 차단';
|
||||
this.row.msg1 = '문구를 입력해주세요.';
|
||||
this.$parent.msgAlertModalOpen(this.row);
|
||||
this.$refs._word.focus();
|
||||
return false;
|
||||
}
|
||||
if(this.msgBlckwordList.length < 10){
|
||||
this.msgBlckwordList.push({
|
||||
//seqNo: '',
|
||||
@@ -194,11 +212,11 @@ export default {
|
||||
Object.assign(this.$data, this.$options.data());
|
||||
this.insertType = type;
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
regisConfirm(){
|
||||
if(this.doValidate()){
|
||||
this.$refs.ValidationConfirmPopup.msgConfirmInsertOpen();
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
|
||||
@@ -58,12 +58,12 @@
|
||||
</table>
|
||||
</form>
|
||||
<div class="popup-btn2 pop-btn3">
|
||||
<button class="btn-pcolor" @click="IntrcpUpdateModal();">수정</button>
|
||||
<button class="btn-pcolor" @click="UpdateConfirm();">수정</button>
|
||||
<button class="btn-default" @click="IntrcpDetailModalClose();">취소</button>
|
||||
<button class="btn-p2color" @click="IntrcpDeleteModal()">삭제</button>
|
||||
<button class="btn-p2color" @click="DeleteConfirm()">삭제</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<validation-confirm-popup ref="ValidationConfirmPopup"></validation-confirm-popup>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -73,6 +73,7 @@
|
||||
//import api from '@/service/api';
|
||||
import riskMgtApi from '../service/riskMgtApi';
|
||||
import api from '@/service/api';
|
||||
import ValidationConfirmPopup from './ValidationConfirmPopup.vue';
|
||||
export default {
|
||||
data(){
|
||||
return{
|
||||
@@ -88,6 +89,9 @@ export default {
|
||||
meno: '',
|
||||
}
|
||||
},
|
||||
components: {
|
||||
ValidationConfirmPopup
|
||||
},
|
||||
methods :{
|
||||
// 모달 띄우기
|
||||
async IntrcpDetailModalOpen(props){
|
||||
@@ -134,12 +138,14 @@ export default {
|
||||
//삭제버튼
|
||||
async IntrcpDeleteModal(){
|
||||
this.setCodeDate();
|
||||
if(window.confirm('삭제 하시겠습니까?')){
|
||||
// if(window.confirm('삭제 하시겠습니까?')){
|
||||
try {
|
||||
const response = await riskMgtApi.deleteIntrcp(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
alert('삭제 하였습니다.');
|
||||
this.row.title = '발신번호 차단';
|
||||
this.row.msg1 = '삭제하였습니다.';
|
||||
this.$parent.alertInsert(this.row);
|
||||
// grid.reloadData();
|
||||
// this.$refs.table.reloadData();
|
||||
this.toComplete();
|
||||
@@ -147,22 +153,24 @@ export default {
|
||||
} catch(err) {
|
||||
alert("실패 하였습니다.");
|
||||
}
|
||||
}
|
||||
// }
|
||||
},
|
||||
//수정버튼
|
||||
async IntrcpUpdateModal(){
|
||||
if(this.doValidate() && window.confirm('수정 하시겠습니까?')){
|
||||
// if(this.doValidate() && window.confirm('수정 하시겠습니까?')){
|
||||
try {
|
||||
const response = await riskMgtApi.updateIntrcp(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
alert('수정 하였습니다.');
|
||||
this.row.title = '발신번호 차단';
|
||||
this.row.msg1 = '수정 하였습니다.';
|
||||
this.$parent.alertInsert(this.row);
|
||||
this.toComplete();
|
||||
}
|
||||
} catch(err) {
|
||||
alert("실패 하였습니다.");
|
||||
}
|
||||
}
|
||||
// }
|
||||
},
|
||||
// 모달 끄기
|
||||
ModalClose(){
|
||||
@@ -191,6 +199,17 @@ export default {
|
||||
this.row.meno=this.meno;
|
||||
return true;
|
||||
},
|
||||
UpdateConfirm(){
|
||||
if(this.doValidate()){
|
||||
this.$refs.ValidationConfirmPopup.confirmUpdateOpen();
|
||||
}
|
||||
},
|
||||
DeleteConfirm(){
|
||||
if(this.doValidate()){
|
||||
this.$refs.ValidationConfirmPopup.confirmDeleteOpen();
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<tr>
|
||||
<th>차단사유</th>
|
||||
<td>
|
||||
<div class="select_box">
|
||||
<div>
|
||||
<select name="" id="" v-model.trim="blckRsnCd" ref="blckRsnCd">
|
||||
<option v-for="(option, i) in rsnType"
|
||||
v-bind:value="option.code"
|
||||
@@ -69,11 +69,12 @@
|
||||
</table>
|
||||
</form>
|
||||
<div class="popup-btn2 pop-btn3">
|
||||
<button class="btn-pcolor" @click="MsgIntrcpUpdateModal()">수정</button>
|
||||
<button class="btn-pcolor" @click="UpdateConfirm()">수정</button>
|
||||
<button class="btn-default" @click="IntrcpDetailModalClose();">취소</button>
|
||||
<button class="btn-p2color" @click="MsgIntrcpDeleteModal()">삭제</button>
|
||||
<button class="btn-p2color" @click="DeleteConfirm()">삭제</button>
|
||||
</div>
|
||||
</div>
|
||||
<validation-confirm-popup ref="ValidationConfirmPopup"></validation-confirm-popup>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -81,6 +82,7 @@
|
||||
<script>
|
||||
import api from '@/service/api';
|
||||
import riskMgtApi from '../service/riskMgtApi';
|
||||
import ValidationConfirmPopup from './ValidationConfirmPopup.vue';
|
||||
export default {
|
||||
data(){
|
||||
return{
|
||||
@@ -106,7 +108,9 @@ export default {
|
||||
created(){
|
||||
this.formReset();
|
||||
},
|
||||
|
||||
components: {
|
||||
ValidationConfirmPopup
|
||||
},
|
||||
methods :{
|
||||
ModalOpen(){
|
||||
this.formReset();
|
||||
@@ -209,36 +213,42 @@ export default {
|
||||
//삭제버튼
|
||||
async MsgIntrcpDeleteModal(){
|
||||
this.setCodeDate();
|
||||
if(window.confirm('삭제 하시겠습니까?')){
|
||||
// if(window.confirm('삭제 하시겠습니까?')){
|
||||
try {
|
||||
const response = await riskMgtApi.deleteMsgIntrcp(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
alert('삭제 하였습니다.');
|
||||
// grid.reloadData();
|
||||
// this.$refs.table.reloadData();
|
||||
this.row.title = '메세지 차단';
|
||||
this.row.msg1 = '삭제 하였습니다.';
|
||||
this.$parent.msgAlertModalOpen(this.row);
|
||||
}
|
||||
this.toComplete();
|
||||
}
|
||||
} catch(err) {
|
||||
alert("실패 하였습니다.");
|
||||
this.row.title = '메세지 차단';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$parent.msgAlertModalOpen(this.row);
|
||||
}
|
||||
}
|
||||
// }
|
||||
},
|
||||
|
||||
//수정버튼
|
||||
async MsgIntrcpUpdateModal(){
|
||||
if(this.doValidate() && window.confirm('수정 하시겠습니까?')){
|
||||
// if(this.doValidate() && window.confirm('수정 하시겠습니까?')){
|
||||
try {
|
||||
const response = await riskMgtApi.updateMsgIntrcp(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
alert('수정 하였습니다.');
|
||||
this.row.title = '메세지 차단';
|
||||
this.row.msg1 = '수정 하였습니다.';
|
||||
this.$parent.msgAlertModalOpen(this.row);
|
||||
}
|
||||
this.toComplete();
|
||||
} catch(err) {
|
||||
alert("실패 하였습니다.");
|
||||
this.row.title = '메세지 차단';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$parent.msgAlertModalOpen(this.row);
|
||||
}
|
||||
}
|
||||
// }
|
||||
},
|
||||
|
||||
IntrcpDetailModalClose(){
|
||||
@@ -259,6 +269,16 @@ export default {
|
||||
popup[0].style.display = 'none';
|
||||
|
||||
},
|
||||
UpdateConfirm(){
|
||||
if(this.doValidate()){
|
||||
this.$refs.ValidationConfirmPopup.msgConfirmUpdateOpen();
|
||||
}
|
||||
},
|
||||
DeleteConfirm(){
|
||||
if(this.doValidate()){
|
||||
this.$refs.ValidationConfirmPopup.msgConfirmDeleteOpen();
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,288 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="dimmed confirm" @click="confirmModalCancel();"></div>
|
||||
<div class="popup-wrap confirm">
|
||||
<!-- 수정 확인 -->
|
||||
<div class="popup confirm">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">{{title}}</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>{{msg}}</p>
|
||||
</div>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor" @click="confirmModalClose();">확인</button>
|
||||
<button class="btn-default" @click="confirmModalCancel();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 발신번호차단 등록 - 최초 등록 -->
|
||||
<div class="dimmed confirm-insert" @click="confirmInsertClose();"></div>
|
||||
<div class="popup-wrap confirm-insert">
|
||||
<div class="popup confirm-insert">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">발신번호차단 등록</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>작성된 내용으로 등록 하시겠습니까?</p>
|
||||
</div>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor" @click="confirmInsert();">확인</button>
|
||||
<button class="btn-default" @click="confirmInsertClose();">취소</button>
|
||||
</div>
|
||||
</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>
|
||||
</div>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor" @click="confirmUpdate();">확인</button>
|
||||
<button class="btn-default" @click="confirmUpdateClose();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 발신번호차단 상세 삭제-->
|
||||
<div class="dimmed confirm-delete" @click="confirmDeleteClose();"></div>
|
||||
<div class="popup-wrap confirm-delete">
|
||||
<div class="popup confirm-delete">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">발신번호 차단 상세</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>해당 발신번호를 차단리스트에서</p>
|
||||
<p>삭제하시겠습니까?</p>
|
||||
</div>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor" @click="confirmDelete();">확인</button>
|
||||
<button class="btn-default" @click="confirmDeleteClose();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 메세지 등록 - 최초 등록 -->
|
||||
<div class="dimmed msgconfirm-insert" @click="msgConfirmInsertClose();"></div>
|
||||
<div class="popup-wrap msgconfirm-insert">
|
||||
<div class="popup msgconfirm-insert">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">메세지차단 등록</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>작성된 내용으로 등록 하시겠습니까?</p>
|
||||
</div>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor" @click="msgConfirmInsert();">확인</button>
|
||||
<button class="btn-default" @click="msgConfirmInsertClose();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 메세지차단 상세 - 수정 -->
|
||||
<div class="dimmed msgconfirm-update" @click="msgConfirmUpdateClose();"></div>
|
||||
<div class="popup-wrap msgconfirm-update">
|
||||
<div class="popup msgconfirm-update">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">메세지 차단 상세</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>작성된 내용으로 수정하겠습니까?</p>
|
||||
</div>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor" @click="msgConfirmUpdate();">확인</button>
|
||||
<button class="btn-default" @click="msgConfirmUpdateClose();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 메세지차단 상세 삭제-->
|
||||
<div class="dimmed msgconfirm-delete" @click="msgConfirmDeleteClose();"></div>
|
||||
<div class="popup-wrap msgconfirm-delete">
|
||||
<div class="popup msgconfirm-delete">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">메세지 차단 상세</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>해당 메세지를 차단리스트에서</p>
|
||||
<p>삭제하시겠습니까?</p>
|
||||
</div>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor" @click="msgConfirmDelete();">확인</button>
|
||||
<button class="btn-default" @click="msgConfirmDeleteClose();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "validationConfirmPopup",
|
||||
data(){
|
||||
return{
|
||||
row:{},
|
||||
title:'',
|
||||
msg:'',
|
||||
}
|
||||
},
|
||||
methods :{
|
||||
//발신번호차단등록 - 최초등록 Open
|
||||
confirmInsertOpen(){
|
||||
var dimmed = document.getElementsByClassName('confirm-insert');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
|
||||
},
|
||||
//사용자등록 - 최초등록
|
||||
confirmInsert(){
|
||||
var dimmed = document.getElementsByClassName('confirm-insert');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
this.$parent.doInsert();
|
||||
|
||||
},
|
||||
//발신번호차단등록 - 최초등록 Close
|
||||
confirmInsertClose(){
|
||||
var dimmed = document.getElementsByClassName('confirm-insert');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
},
|
||||
// 발신번호차단 삭제 Open
|
||||
confirmDeleteOpen(){
|
||||
var dimmed = document.getElementsByClassName('confirm-delete');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
},
|
||||
//발신번호차단번호 삭제
|
||||
confirmDelete(){
|
||||
var dimmed = document.getElementsByClassName('confirm-delete');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
this.$parent.IntrcpDeleteModal();
|
||||
},
|
||||
//발신번호차단 삭제 Close
|
||||
confirmDeleteClose(){
|
||||
var dimmed = document.getElementsByClassName('confirm-delete');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
},
|
||||
//발신번호차단 수정 확인 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.$parent.IntrcpUpdateModal();
|
||||
|
||||
},
|
||||
// 발신번호차단 수정 Close
|
||||
confirmUpdateClose(){
|
||||
var dimmed = document.getElementsByClassName('confirm-update');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
//메세지차단등록 - 최초등록 Open
|
||||
msgConfirmInsertOpen(){
|
||||
var dimmed = document.getElementsByClassName('msgconfirm-insert');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
|
||||
},
|
||||
//메세지등록 - 최초등록
|
||||
msgConfirmInsert(){
|
||||
var dimmed = document.getElementsByClassName('msgconfirm-insert');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
this.$parent.doInsert();
|
||||
|
||||
},
|
||||
//메세지차단등록 - 최초등록 Close
|
||||
msgConfirmInsertClose(){
|
||||
var dimmed = document.getElementsByClassName('msgconfirm-insert');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
},
|
||||
// 메세지차단 삭제 Open
|
||||
msgConfirmDeleteOpen(){
|
||||
var dimmed = document.getElementsByClassName('msgconfirm-delete');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
},
|
||||
//메세지차단번호 삭제
|
||||
msgConfirmDelete(){
|
||||
var dimmed = document.getElementsByClassName('msgconfirm-delete');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
this.$parent.MsgIntrcpDeleteModal();
|
||||
},
|
||||
//메세지차단 삭제 Close
|
||||
msgConfirmDeleteClose(){
|
||||
var dimmed = document.getElementsByClassName('msgconfirm-delete');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
},
|
||||
//메세지차단 수정 확인 Open
|
||||
msgConfirmUpdateOpen(){
|
||||
var dimmed = document.getElementsByClassName('msgconfirm-update');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
|
||||
},
|
||||
//메세지차단 수정 확인
|
||||
msgConfirmUpdate(){
|
||||
var dimmed = document.getElementsByClassName('msgconfirm-update');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
this.$parent.MsgIntrcpUpdateModal();
|
||||
|
||||
},
|
||||
// 메세지차단 수정 Close
|
||||
msgConfirmUpdateClose(){
|
||||
var dimmed = document.getElementsByClassName('msgconfirm-update');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -82,7 +82,7 @@
|
||||
</div>
|
||||
<insert-intrcp-pop ref="insertIntrcpPop"> </insert-intrcp-pop>
|
||||
<intrcp-detail-popup ref="intrcpDetailPopup"></intrcp-detail-popup>
|
||||
<common-modal ref="commmonModal"></common-modal>
|
||||
<common-modal ref="commonModal"></common-modal>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -241,6 +241,20 @@ export default {
|
||||
// Object.assign(this.$data, this.$options.data());
|
||||
// this.insertType = type;
|
||||
// },
|
||||
|
||||
alertInsert(props){
|
||||
console.log(props);
|
||||
this.$refs.commonModal.alertModalOpen(props);
|
||||
},
|
||||
confirmInsert(props){
|
||||
this.$refs.commonModal.confirmModalOpen(props);
|
||||
},
|
||||
confirmCalbackFnc: function(props){
|
||||
console.log('dsfsd');
|
||||
// if(props.result){
|
||||
// // this.doInsert(props.result);
|
||||
// }
|
||||
},
|
||||
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
</div>
|
||||
<insert-msg-pop ref="InsertMsgPop"></insert-msg-pop>
|
||||
<intrcp-msg-detail ref="IntrcpMsgDetail"></intrcp-msg-detail>
|
||||
<common-modal ref="commmonModal"></common-modal>
|
||||
<common-modal ref="commonModal"></common-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -202,7 +202,10 @@ export default {
|
||||
msgDetailPop(props) {
|
||||
// console.log(props);
|
||||
this.$refs.IntrcpMsgDetail.IntrcpMsgDetailModalOpen(props);
|
||||
}
|
||||
},
|
||||
msgAlertModalOpen(props){
|
||||
this.$refs.commonModal.alertModalOpen(props);
|
||||
}
|
||||
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
|
||||
@@ -185,7 +185,8 @@ export default {
|
||||
},
|
||||
//회원 상세페이지로 이동
|
||||
memberDetail(props) {
|
||||
this.row.custNm = props.serviceId;
|
||||
console.log(props);
|
||||
this.row.serviceId = props.userId;
|
||||
this.$router.push({ name: 'subsDetail', params: this.row});
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import MonthList from '../views/MonthList'
|
||||
import BsnmMonthList from '../views/BsnmMonthList'
|
||||
import DayList from '../views/DayList'
|
||||
import BsnmDayList from '../views/BsnmDayList'
|
||||
|
||||
export default [
|
||||
{
|
||||
@@ -14,6 +16,18 @@ export default [
|
||||
name: 'bsnmMonthList',
|
||||
meta: { public: true }
|
||||
},
|
||||
{
|
||||
path: '/stats/dayList',
|
||||
component: DayList,
|
||||
name: 'dayList',
|
||||
meta: { public: true }
|
||||
},
|
||||
{
|
||||
path: '/stats/bsnmDayList',
|
||||
component: BsnmDayList,
|
||||
name: 'bsnmDayList',
|
||||
meta: { public: true }
|
||||
},
|
||||
|
||||
]
|
||||
|
||||
|
||||
29
frontend/src/modules/stats/service/statsApi.js
Normal file
29
frontend/src/modules/stats/service/statsApi.js
Normal file
@@ -0,0 +1,29 @@
|
||||
import httpClient from '@/common/http-client';
|
||||
|
||||
// HUBEZ_BO_API - 일별 통계 목록 조회.
|
||||
const dayList = (params) => {
|
||||
return httpClient.post('/api/v1/bo/stats/dayList', params, { withCredentials: false });
|
||||
}
|
||||
|
||||
// HUBEZ_BO_API - 월별 통계 목록 조회.
|
||||
const monthList = (params) => {
|
||||
return httpClient.post('/api/v1/bo/stats/monthList', params, { withCredentials: false });
|
||||
}
|
||||
|
||||
// HUBEZ_BO_API - [사업자별] 일별 통계 목록 조회.
|
||||
const bsnmDayList = (params) => {
|
||||
return httpClient.post('/api/v1/bo/stats/bsnmDayList', params, { withCredentials: false });
|
||||
}
|
||||
|
||||
// HUBEZ_BO_API - [사업자별] 월별 통계 목록 조회.
|
||||
const bsnmMonthList = (params) => {
|
||||
return httpClient.post('/api/v1/bo/stats/bsnmMonthList', params, { withCredentials: false });
|
||||
}
|
||||
|
||||
export default {
|
||||
dayList,
|
||||
monthList,
|
||||
bsnmDayList,
|
||||
bsnmMonthList,
|
||||
|
||||
}
|
||||
366
frontend/src/modules/stats/views/BsnmDayList.vue
Normal file
366
frontend/src/modules/stats/views/BsnmDayList.vue
Normal file
@@ -0,0 +1,366 @@
|
||||
<template>
|
||||
|
||||
<div class="contents">
|
||||
<div class="contents_wrap">
|
||||
<div class="top_wrap">
|
||||
<h3 class="title">사업자별 통계</h3>
|
||||
<p class="breadcrumb">발송통계 > 사업자별 통계</p>
|
||||
</div>
|
||||
|
||||
<div class="top_tab">
|
||||
<a href="javascript:void(0);" @click="toMove('bsnmMonthList')">월별통계</a>
|
||||
<a href="javascript:void(0);" class="on">일별통계</a>
|
||||
</div>
|
||||
|
||||
|
||||
<form autocomplete="off" class="search_form">
|
||||
<div class="search_wrap">
|
||||
<div class="input_box cal">
|
||||
<label for="right" class="label txt">날짜</label>
|
||||
<p> 최대 3개월까지 조회 가능합니다.</p>
|
||||
<div class="term">
|
||||
<!--
|
||||
<input class="date" type="text" id="" placeholder="2022-10-12"/>
|
||||
~
|
||||
<input class="" type="text" id="" placeholder="2022-10-12"/>
|
||||
-->
|
||||
<div class="group" style="width:500px;">
|
||||
<span class="custom_input icon_date">
|
||||
<vuejs-datepicker
|
||||
:language="ko"
|
||||
:format="customFormatter"
|
||||
:disabled-dates="disabledSDate"
|
||||
v-model="startDate"
|
||||
@selected="selectedStartDate(0)"
|
||||
@closed="closeDate('start')"
|
||||
></vuejs-datepicker>
|
||||
</span>~
|
||||
<span class="custom_input icon_date">
|
||||
<vuejs-datepicker
|
||||
:language="ko"
|
||||
:format="customFormatter"
|
||||
:disabled-dates="disabledEDate"
|
||||
v-model="endDate"
|
||||
@selected="selectedEndDate(0)"
|
||||
@closed="closeDate('end')"
|
||||
></vuejs-datepicker>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="input_box id">
|
||||
<label for="name" class="label">고객사명</label>
|
||||
<input type="text" id="name" placeholder="검색어 입력" v-model="grid.params.custNm">
|
||||
</div>
|
||||
<div class="input_box">
|
||||
<label for="name" class="label">사업자등록번호</label>
|
||||
<input type="text" id="name" placeholder="검색어 입력" v-model="grid.params.bizrno">
|
||||
</div>
|
||||
<button type="button" class="button grey" @click="search">조회</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="info">
|
||||
<div class="count">집계결과</div>
|
||||
<div class="button_group">
|
||||
<button type="button" class="button blue download">엑셀 다운로드</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="table calculate scroll">
|
||||
<custom-grid
|
||||
ref="table"
|
||||
:totalItems="'totalItems'"
|
||||
:url="grid.url"
|
||||
:pagePerRows="grid.pagePerRows"
|
||||
:initialRequest="grid.initialRequest"
|
||||
:pagination="grid.pagination"
|
||||
:isCheckbox="grid.isCheckbox"
|
||||
:columns="grid.columns"
|
||||
:noDataStr="grid.noDataStr"
|
||||
:addCls="grid.addCls"
|
||||
:header="grid.header"
|
||||
></custom-grid>
|
||||
</div>
|
||||
<common-modal ref="commmonModal"></common-modal>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import moment from 'moment';
|
||||
import statsApi from "../service/statsApi.js";
|
||||
import customGrid from '@/components/CustomGrid';
|
||||
import xlsx from '@/common/excel';
|
||||
import commonModal from "@/components/modal/commonModal";
|
||||
|
||||
export default {
|
||||
name: 'bsnmDayList',
|
||||
data() {
|
||||
return {
|
||||
// 달력 데이터
|
||||
ko: vdp_translation_ko.js,
|
||||
periodDay: 7,
|
||||
sDateDiv: 'date',
|
||||
startDate: new Date(),
|
||||
endDate: new Date(),
|
||||
|
||||
startDt:'',
|
||||
endDt:'',
|
||||
startYear:'',
|
||||
startMonth:'',
|
||||
endYear:'',
|
||||
endMonth:'',
|
||||
row: {},
|
||||
list:[],
|
||||
totalCnt: '',
|
||||
|
||||
pageType: 'SUBS',
|
||||
|
||||
// 테이블 리스트 데이터
|
||||
perPageCnt: 50,
|
||||
options: [
|
||||
{ text: '20', value: 20},
|
||||
{ text: '50', value: 50},
|
||||
{ text: '100', value: 100}
|
||||
],
|
||||
totalItems: 0,
|
||||
grid: {
|
||||
url: '/api/v1/bo/stats/bsnmDayList',
|
||||
pagePerRows: 20,
|
||||
pagination: true,
|
||||
isCheckbox: false, // true:첫번째 컬럼 앞에 체크박스 생성 / false:체크박스 제거
|
||||
initialRequest: false,
|
||||
addCls: 'box_OFvis',
|
||||
|
||||
header:[
|
||||
[
|
||||
{ header: '날짜', childNames: [] },
|
||||
{ header: '고객사명', childNames: [] },
|
||||
{ header: '사업자번호', childNames: [] },
|
||||
{ header: '전체', childNames: ['sndCnt','succCntRt'] },
|
||||
{ header: 'SMS', childNames: ['sndCntS','succCntRtS'] },
|
||||
{ header: 'LMS', childNames: ['sndCntL','succCntRtL'] },
|
||||
{ header: 'MMS', childNames: ['sndCntM','succCntRtM'] },
|
||||
{ header: '알림톡', childNames: ['sndCntR','succCntRtR'] },
|
||||
]
|
||||
],
|
||||
|
||||
columns: [
|
||||
{ name: 'sumYmd', header: '날짜', align: 'center'},
|
||||
{ name: 'custNm', header: '고객사명', align: 'center'},
|
||||
{ name: 'bizrno', header: '사업자번호', align: 'center'},
|
||||
{ name: 'sndCnt', header: '발송건수', align: 'center', cls: 'td_line',
|
||||
formatter: props =>{
|
||||
let result = props.sndCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
||||
return result;
|
||||
}
|
||||
},
|
||||
{ name: 'succCntRt',
|
||||
header: '성공건수/(%)',
|
||||
align: 'center',
|
||||
cls: 'td_line',
|
||||
formatter: props => {
|
||||
return "<p>"+ props.succCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')+"</p>\n<p>("+props.succRt+"%)</p>";
|
||||
}
|
||||
},
|
||||
{ name: 'sndCntS', header: '발송건수', align: 'center', cls: 'td_line',
|
||||
formatter: props =>{
|
||||
let result = props.sndCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
||||
return result;
|
||||
}
|
||||
},
|
||||
{ name: 'succCntRtS',
|
||||
header: '성공건수/(%)',
|
||||
align: 'center',
|
||||
cls: 'td_line',
|
||||
formatter: props => {
|
||||
return "<p>"+ props.succCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')+"</p>\n<p>("+props.succRtS+"%)</p>";
|
||||
}
|
||||
},
|
||||
{ name: 'sndCntL', header: '발송건수', align: 'center', cls: 'td_line',
|
||||
formatter: props =>{
|
||||
let result = props.sndCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
||||
return result;
|
||||
}
|
||||
},
|
||||
{ name: 'succCntRtL',
|
||||
header: '성공건수/(%)',
|
||||
align: 'center',
|
||||
cls: 'td_line',
|
||||
formatter: props => {
|
||||
return "<p>"+ props.succCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')+"</p>\n<p>("+props.succRtL+"%)</p>";
|
||||
}
|
||||
},
|
||||
{ name: 'sndCntM', header: '발송건수', align: 'center', cls: 'td_line',
|
||||
formatter: props =>{
|
||||
let result = props.sndCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
||||
return result;
|
||||
}
|
||||
},
|
||||
{ name: 'succCntRtM',
|
||||
header: '성공건수/(%)',
|
||||
align: 'center',
|
||||
cls: 'td_line',
|
||||
formatter: props => {
|
||||
return "<p>"+ props.succCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')+"</p>\n<p>("+props.succRtM+"%)</p>";
|
||||
}
|
||||
},
|
||||
{ name: 'sndCntR', header: '발송건수', align: 'center', cls: 'td_line',
|
||||
formatter: props =>{
|
||||
let result = props.sndCntR.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
||||
return result;
|
||||
}
|
||||
},
|
||||
{ name: 'succCntRtR',
|
||||
header: '성공건수/(%)',
|
||||
align: 'center',
|
||||
cls: 'td_line',
|
||||
formatter: props => {
|
||||
return "<p>"+ props.succCntR.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')+"</p>\n<p>("+props.succRtR+")</p>";
|
||||
}
|
||||
},
|
||||
],
|
||||
noDataStr: '검색 결과가 없습니다.',
|
||||
params: {
|
||||
startDay: '',
|
||||
endDay: ''
|
||||
},
|
||||
excelHeader: []
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
},
|
||||
components: {
|
||||
customGrid: customGrid,
|
||||
commonModal,
|
||||
vuejsDatepicker,
|
||||
},
|
||||
created(){
|
||||
this.$store.commit("login/isLogin", true);
|
||||
this.$store.commit("login/isAuthChk", true);
|
||||
this.setPeriodDay(0);
|
||||
|
||||
},
|
||||
destroyed() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
let page = 1;
|
||||
// 페이지 정보 및 검색 조건
|
||||
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
console.log('getCondition : '+getCondition);
|
||||
|
||||
// store에 저장된 페이지 정보 및 검색 조건을 불러오기
|
||||
let isKeep = false;
|
||||
if (getCondition) {
|
||||
this.grid.pagePerRows = getCondition.perPage;
|
||||
this.grid.params = getCondition.params;
|
||||
page = getCondition.page;
|
||||
isKeep = true;
|
||||
}
|
||||
this.search(isKeep);
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
|
||||
const getP = this.$refs.table.getPagination();
|
||||
console.log("==========getP : " + getP._currentPage);
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: getP._currentPage,
|
||||
perPage: this.perPageCnt,
|
||||
params: this.grid.params
|
||||
});
|
||||
// 라우트 하기전 실행
|
||||
next();
|
||||
},
|
||||
methods: {
|
||||
search: function(isKeep) {
|
||||
console.log('>>>>>>> search Start >>>>>>');
|
||||
this.grid.params = {
|
||||
startDay: moment(this.startDate).format('YYYYMMDD'),
|
||||
endDay: moment(this.endDate).format('YYYYMMDD'),
|
||||
custNm: this.grid.params.custNm,
|
||||
bizrno: this.grid.params.bizrno
|
||||
};
|
||||
console.log('this.perPageCnt'+this.perPageCnt);
|
||||
console.log(this.grid.params);
|
||||
|
||||
if (moment(this.grid.params.startDay).isBefore(moment(this.grid.params.endDay).subtract(1, 'months').format('YYYYMMDD'))) {
|
||||
//alert('검색 기간은 최대 1개월까지 선택 가능 합니다.');
|
||||
this.row.title = '발송통계';
|
||||
this.row.msg1 = '검색 기간은 최대 1개월까지 선택 가능 합니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false
|
||||
}
|
||||
|
||||
this.$refs.table.search(this.grid.params, isKeep);
|
||||
this.sendStoreData();
|
||||
},
|
||||
toMove(routeName) {
|
||||
this.$router.push({ name: routeName, params: { page: 1, searchText: '' } });
|
||||
},
|
||||
setPeriodDay(day) {
|
||||
this.periodDay = day;
|
||||
this.endDate = new Date();
|
||||
this.startDate = moment(this.endDate)
|
||||
.subtract(day, 'day')
|
||||
.toDate();
|
||||
|
||||
this.closeDate('start');
|
||||
this.closeDate('end');
|
||||
},
|
||||
selectedStartDate(day) {
|
||||
if (day != undefined && day != null) {
|
||||
this.periodDay = day;
|
||||
}
|
||||
if (this.startDate > this.endDate) {
|
||||
this.startDate = this.endDate;
|
||||
}
|
||||
// console.log(this.disabledSDate)
|
||||
// this.grid.params.startDt = day
|
||||
},
|
||||
selectedEndDate(day) {
|
||||
if (day != undefined && day != null) {
|
||||
this.periodDay = day;
|
||||
}
|
||||
},
|
||||
closeDate(type) {
|
||||
if (type != undefined && type != null) {
|
||||
if (type == 'start') {
|
||||
this.disabledSDate = { from: this.endDate };
|
||||
this.disabledEDate = { to: this.startDate, from: this.endDate };
|
||||
} else if (type == 'end') {
|
||||
this.disabledSDate = { from: this.endDate };
|
||||
this.disabledEDate = { to: this.startDate, from: new Date() };
|
||||
}
|
||||
}
|
||||
},
|
||||
customFormatter: function(date) {
|
||||
if (this.sDateDiv == 'month') {
|
||||
return moment(date).format('YYYY-MM');
|
||||
} else if (this.sDateDiv == 'year') {
|
||||
return moment(date).format('YYYY');
|
||||
} else {
|
||||
return moment(date).format('YYYY-MM-DD');
|
||||
}
|
||||
},
|
||||
changePerPage: function(){ // 페이지당 조회할 개수
|
||||
this.grid.pagePerRows = this.perPageCnt;
|
||||
this.search(true);
|
||||
},
|
||||
sendStoreData: function() {
|
||||
const getP = this.$refs.table.getPagination();
|
||||
console.log("==========getP : " + getP._currentPage);
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: getP._currentPage,
|
||||
perPage: this.perPageCnt,
|
||||
params: this.grid.params
|
||||
});
|
||||
|
||||
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
console.log("getCondition : "+ getCondition.perPage);
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -8,7 +8,8 @@
|
||||
</div>
|
||||
|
||||
<div class="top_tab">
|
||||
<a href="statistics_business.html" class="on">월별통계</a><a href="statistics_business_day.html">일별통계</a>
|
||||
<a href="javascript:void(0);" class="on">월별통계</a>
|
||||
<a href="javascript:void(0);" @click="toMove('bsnmDayList')">일별통계</a>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -18,20 +19,49 @@
|
||||
<label for="right" class="label txt">날짜</label>
|
||||
<p> 최대 3개월까지 조회 가능합니다.</p>
|
||||
<div class="term">
|
||||
<!--
|
||||
<input class="date" type="text" id="" placeholder="2022-10-12"/>
|
||||
~
|
||||
<input class="" type="text" id="" placeholder="2022-10-12"/>
|
||||
-->
|
||||
<div class="group" style="width:500px;">
|
||||
<span class="custom_input icon_date">
|
||||
<vuejs-datepicker
|
||||
:language="ko"
|
||||
:format="customFormatter"
|
||||
:disabled-dates="disabledSDate"
|
||||
:minimumView="sDateDiv"
|
||||
:maximumView="sDateDiv"
|
||||
v-model="startDate"
|
||||
@selected="selectedStartDate(0)"
|
||||
@closed="closeDate('start')"
|
||||
></vuejs-datepicker>
|
||||
</span>~
|
||||
<span class="custom_input icon_date">
|
||||
<vuejs-datepicker
|
||||
:language="ko"
|
||||
:format="customFormatter"
|
||||
:disabled-dates="disabledEDate"
|
||||
:minimumView="sDateDiv"
|
||||
:maximumView="sDateDiv"
|
||||
v-model="endDate"
|
||||
@selected="selectedEndDate(0)"
|
||||
@closed="closeDate('end')"
|
||||
></vuejs-datepicker>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="input_box id">
|
||||
<label for="name" class="label">고객사명</label>
|
||||
<input type="text" id="name" placeholder="검색어 입력">
|
||||
<input type="text" id="name" placeholder="검색어 입력" v-model="grid.params.custNm">
|
||||
</div>
|
||||
<div class="input_box">
|
||||
<label for="name" class="label">사업자등록번호</label>
|
||||
<input type="text" id="name" placeholder="검색어 입력">
|
||||
<input type="text" id="name" placeholder="검색어 입력" v-model="grid.params.bizrno">
|
||||
</div>
|
||||
<button type="button" class="button grey">조회</button>
|
||||
<button type="button" class="button grey" @click="search">조회</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="info">
|
||||
@@ -42,215 +72,298 @@
|
||||
|
||||
</div>
|
||||
<div class="table calculate scroll">
|
||||
<div>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="2">날짜</th>
|
||||
<th rowspan="2">고객사명</th>
|
||||
<th rowspan="2">사업자번호</th>
|
||||
<th colspan="2">전체</th>
|
||||
<th colspan="2">SMS</th>
|
||||
<th colspan="2">LMS</th>
|
||||
<th colspan="2">MMS</th>
|
||||
<th colspan="2">알림톡</th>
|
||||
</tr>
|
||||
<tr class="total">
|
||||
<th>발송건수</th>
|
||||
<th>성공건수/(%)</th>
|
||||
<th>발송건수</th>
|
||||
<th>성공건수/(%)</th>
|
||||
<th>발송건수</th>
|
||||
<th>성공건수/(%)</th>
|
||||
<th>발송건수</th>
|
||||
<th>성공건수/(%)</th>
|
||||
<th>발송건수</th>
|
||||
<th>성공건수/(%)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>2022-04</td>
|
||||
<td>유플러스</td>
|
||||
<td>229-81-39938</td>
|
||||
<td>84,000,000</td>
|
||||
<td>84,000,000<br>(100%)</td>
|
||||
<td>21,000,000</td>
|
||||
<td>21,000,000<br>(100%)</td>
|
||||
<td>21,000,000</td>
|
||||
<td>21,000,000<br>(100%)</td>
|
||||
<td>21,000,000</td>
|
||||
<td>21,000,000<br>(100%)</td>
|
||||
<td>21,000,000</td>
|
||||
<td>21,000,000<br>(100%)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2022-03</td>
|
||||
<td>유플러스</td>
|
||||
<td>229-81-39938</td>
|
||||
<td>40,000,000</td>
|
||||
<td>40,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2022-02</td>
|
||||
<td>유플러스</td>
|
||||
<td>229-81-39938</td>
|
||||
<td>40,000,000</td>
|
||||
<td>40,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2022-01</td>
|
||||
<td>유플러스</td>
|
||||
<td>229-81-39938</td>
|
||||
<td>40,000,000</td>
|
||||
<td>40,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2021-12</td>
|
||||
<td>유플러스</td>
|
||||
<td>229-81-39938</td>
|
||||
<td>40,000,000</td>
|
||||
<td>40,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2021-11</td>
|
||||
<td>유플러스</td>
|
||||
<td>229-81-39938</td>
|
||||
<td>40,000,000</td>
|
||||
<td>40,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2021-10</td>
|
||||
<td>유플러스</td>
|
||||
<td>229-81-39938</td>
|
||||
<td>40,000,000</td>
|
||||
<td>40,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2021-09</td>
|
||||
<td>유플러스</td>
|
||||
<td>229-81-39938</td>
|
||||
<td>40,000,000</td>
|
||||
<td>40,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2021-08</td>
|
||||
<td>유플러스</td>
|
||||
<td>229-81-39938</td>
|
||||
<td>40,000,000</td>
|
||||
<td>40,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2021-07</td>
|
||||
<td>유플러스</td>
|
||||
<td>229-81-39938</td>
|
||||
<td>40,000,000</td>
|
||||
<td>40,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<custom-grid
|
||||
ref="table"
|
||||
:totalItems="'totalItems'"
|
||||
:url="grid.url"
|
||||
:pagePerRows="grid.pagePerRows"
|
||||
:initialRequest="grid.initialRequest"
|
||||
:pagination="grid.pagination"
|
||||
:isCheckbox="grid.isCheckbox"
|
||||
:columns="grid.columns"
|
||||
:noDataStr="grid.noDataStr"
|
||||
:addCls="grid.addCls"
|
||||
:header="grid.header"
|
||||
></custom-grid>
|
||||
</div>
|
||||
<common-modal ref="commmonModal"></common-modal>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import moment from 'moment';
|
||||
import statsApi from "../service/statsApi.js";
|
||||
import customGrid from '@/components/CustomGrid';
|
||||
//import api from '../service/api';
|
||||
import xlsx from '@/common/excel';
|
||||
import commonModal from "@/components/modal/commonModal";
|
||||
|
||||
export default {
|
||||
name: 'monthList',
|
||||
name: 'bsnmMonthList',
|
||||
data() {
|
||||
return {
|
||||
// 달력 데이터
|
||||
ko: vdp_translation_ko.js,
|
||||
periodDay: 7,
|
||||
sDateDiv: 'month',
|
||||
startDate: new Date(),
|
||||
endDate: new Date(),
|
||||
|
||||
startDt:'',
|
||||
endDt:'',
|
||||
startYear:'',
|
||||
startMonth:'',
|
||||
endYear:'',
|
||||
endMonth:'',
|
||||
row: {},
|
||||
list:[],
|
||||
totalCnt: '',
|
||||
|
||||
pageType: 'SUBS',
|
||||
|
||||
// 테이블 리스트 데이터
|
||||
perPageCnt: 50,
|
||||
options: [
|
||||
{ text: '20', value: 20},
|
||||
{ text: '50', value: 50},
|
||||
{ text: '100', value: 100}
|
||||
],
|
||||
totalItems: 0,
|
||||
grid: {
|
||||
url: '/api/v1/bo/stats/bsnmMonthList',
|
||||
pagePerRows: 20,
|
||||
pagination: true,
|
||||
isCheckbox: false, // true:첫번째 컬럼 앞에 체크박스 생성 / false:체크박스 제거
|
||||
initialRequest: false,
|
||||
addCls: 'box_OFvis',
|
||||
|
||||
header:[
|
||||
[
|
||||
{ header: '날짜', childNames: [] },
|
||||
{ header: '고객사명', childNames: [] },
|
||||
{ header: '사업자번호', childNames: [] },
|
||||
{ header: '전체', childNames: ['sndCnt','succCntRt'] },
|
||||
{ header: 'SMS', childNames: ['sndCntS','succCntRtS'] },
|
||||
{ header: 'LMS', childNames: ['sndCntL','succCntRtL'] },
|
||||
{ header: 'MMS', childNames: ['sndCntM','succCntRtM'] },
|
||||
{ header: '알림톡', childNames: ['sndCntR','succCntRtR'] },
|
||||
]
|
||||
],
|
||||
|
||||
columns: [
|
||||
{ name: 'sumYm', header: '날짜', align: 'center'},
|
||||
{ name: 'custNm', header: '고객사명', align: 'center'},
|
||||
{ name: 'bizrno', header: '사업자번호', align: 'center'},
|
||||
{ name: 'sndCnt', header: '발송건수', align: 'center', cls: 'td_line',
|
||||
formatter: props =>{
|
||||
let result = props.sndCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
||||
return result;
|
||||
}
|
||||
},
|
||||
{ name: 'succCntRt',
|
||||
header: '성공건수/(%)',
|
||||
align: 'center',
|
||||
cls: 'td_line',
|
||||
formatter: props => {
|
||||
return "<p>"+ props.succCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')+"</p>\n<p>("+props.succRt+"%)</p>";
|
||||
}
|
||||
},
|
||||
{ name: 'sndCntS', header: '발송건수', align: 'center', cls: 'td_line',
|
||||
formatter: props =>{
|
||||
let result = props.sndCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
||||
return result;
|
||||
}
|
||||
},
|
||||
{ name: 'succCntRtS',
|
||||
header: '성공건수/(%)',
|
||||
align: 'center',
|
||||
cls: 'td_line',
|
||||
formatter: props => {
|
||||
return "<p>"+ props.succCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')+"</p>\n<p>("+props.succRtS+"%)</p>";
|
||||
}
|
||||
},
|
||||
{ name: 'sndCntL', header: '발송건수', align: 'center', cls: 'td_line',
|
||||
formatter: props =>{
|
||||
let result = props.sndCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
||||
return result;
|
||||
}
|
||||
},
|
||||
{ name: 'succCntRtL',
|
||||
header: '성공건수/(%)',
|
||||
align: 'center',
|
||||
cls: 'td_line',
|
||||
formatter: props => {
|
||||
return "<p>"+ props.succCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')+"</p>\n<p>("+props.succRtL+"%)</p>";
|
||||
}
|
||||
},
|
||||
{ name: 'sndCntM', header: '발송건수', align: 'center', cls: 'td_line',
|
||||
formatter: props =>{
|
||||
let result = props.sndCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
||||
return result;
|
||||
}
|
||||
},
|
||||
{ name: 'succCntRtM',
|
||||
header: '성공건수/(%)',
|
||||
align: 'center',
|
||||
cls: 'td_line',
|
||||
formatter: props => {
|
||||
return "<p>"+ props.succCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')+"</p>\n<p>("+props.succRtM+"%)</p>";
|
||||
}
|
||||
},
|
||||
{ name: 'sndCntR', header: '발송건수', align: 'center', cls: 'td_line',
|
||||
formatter: props =>{
|
||||
let result = props.sndCntR.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
||||
return result;
|
||||
}
|
||||
},
|
||||
{ name: 'succCntRtR',
|
||||
header: '성공건수/(%)',
|
||||
align: 'center',
|
||||
cls: 'td_line',
|
||||
formatter: props => {
|
||||
return "<p>"+ props.succCntR.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')+"</p>\n<p>("+props.succRtR+")</p>";
|
||||
}
|
||||
},
|
||||
],
|
||||
noDataStr: '검색 결과가 없습니다.',
|
||||
params: {
|
||||
startMon: '',
|
||||
endMon: ''
|
||||
},
|
||||
excelHeader: []
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
},
|
||||
components: {
|
||||
customGrid: customGrid
|
||||
customGrid: customGrid,
|
||||
commonModal,
|
||||
vuejsDatepicker,
|
||||
},
|
||||
created(){
|
||||
this.$store.commit("login/isLogin", true);
|
||||
this.$store.commit("login/isAuthChk", true);
|
||||
this.setPeriodDay(0);
|
||||
|
||||
},
|
||||
destroyed() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
let page = 1;
|
||||
// 페이지 정보 및 검색 조건
|
||||
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
console.log('getCondition : '+getCondition);
|
||||
|
||||
// store에 저장된 페이지 정보 및 검색 조건을 불러오기
|
||||
let isKeep = false;
|
||||
isKeep = true;
|
||||
if (getCondition) {
|
||||
this.grid.pagePerRows = getCondition.perPage;
|
||||
this.grid.params = getCondition.params;
|
||||
page = getCondition.page;
|
||||
isKeep = true;
|
||||
}
|
||||
this.search(isKeep);
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
|
||||
const getP = this.$refs.table.getPagination();
|
||||
console.log("==========getP : " + getP._currentPage);
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: getP._currentPage,
|
||||
perPage: this.perPageCnt,
|
||||
params: this.grid.params
|
||||
});
|
||||
// 라우트 하기전 실행
|
||||
next();
|
||||
},
|
||||
methods: {
|
||||
search: function(isKeep) {
|
||||
console.log('>>>>>>> search Start >>>>>>');
|
||||
this.grid.params = {
|
||||
startMon: moment(this.startDate).format('YYYYMM'),
|
||||
endMon: moment(this.endDate).format('YYYYMM'),
|
||||
custNm: this.grid.params.custNm,
|
||||
bizrno: this.grid.params.bizrno
|
||||
};
|
||||
console.log('this.perPageCnt'+this.perPageCnt);
|
||||
console.log(this.grid.params);
|
||||
|
||||
if (moment(this.grid.params.startMon).isBefore(moment(this.grid.params.endMon).subtract(2, 'months').format('YYYYMM'))) {
|
||||
//alert('검색 기간은 최대 3개월까지 선택 가능 합니다.');
|
||||
this.row.title = '발송통계';
|
||||
this.row.msg1 = '검색 기간은 최대 3개월까지 선택 가능 합니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false
|
||||
}
|
||||
|
||||
this.$refs.table.search(this.grid.params, isKeep);
|
||||
this.sendStoreData();
|
||||
},
|
||||
toMove(routeName) {
|
||||
this.$router.push({ name: routeName, params: { page: 1, searchText: '' } });
|
||||
},
|
||||
setPeriodDay(day) {
|
||||
this.periodDay = day;
|
||||
this.endDate = new Date();
|
||||
this.startDate = moment(this.endDate)
|
||||
.subtract(day, 'day')
|
||||
.toDate();
|
||||
|
||||
this.closeDate('start');
|
||||
this.closeDate('end');
|
||||
},
|
||||
selectedStartDate(day) {
|
||||
if (day != undefined && day != null) {
|
||||
this.periodDay = day;
|
||||
}
|
||||
if (this.startDate > this.endDate) {
|
||||
this.startDate = this.endDate;
|
||||
}
|
||||
// console.log(this.disabledSDate)
|
||||
// this.grid.params.startDt = day
|
||||
},
|
||||
selectedEndDate(day) {
|
||||
if (day != undefined && day != null) {
|
||||
this.periodDay = day;
|
||||
}
|
||||
},
|
||||
closeDate(type) {
|
||||
if (type != undefined && type != null) {
|
||||
if (type == 'start') {
|
||||
this.disabledSDate = { from: this.endDate };
|
||||
this.disabledEDate = { to: this.startDate, from: this.endDate };
|
||||
} else if (type == 'end') {
|
||||
this.disabledSDate = { from: this.endDate };
|
||||
this.disabledEDate = { to: this.startDate, from: new Date() };
|
||||
}
|
||||
}
|
||||
},
|
||||
customFormatter: function(date) {
|
||||
if (this.sDateDiv == 'month') {
|
||||
return moment(date).format('YYYY-MM');
|
||||
} else if (this.sDateDiv == 'year') {
|
||||
return moment(date).format('YYYY');
|
||||
} else {
|
||||
return moment(date).format('YYYY-MM-DD');
|
||||
}
|
||||
},
|
||||
changePerPage: function(){ // 페이지당 조회할 개수
|
||||
this.grid.pagePerRows = this.perPageCnt;
|
||||
this.search(true);
|
||||
},
|
||||
sendStoreData: function() {
|
||||
const getP = this.$refs.table.getPagination();
|
||||
console.log("==========getP : " + getP._currentPage);
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: getP._currentPage,
|
||||
perPage: this.perPageCnt,
|
||||
params: this.grid.params
|
||||
});
|
||||
|
||||
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
console.log("getCondition : "+ getCondition.perPage);
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
273
frontend/src/modules/stats/views/DayList.vue
Normal file
273
frontend/src/modules/stats/views/DayList.vue
Normal file
@@ -0,0 +1,273 @@
|
||||
<template>
|
||||
<div class="contents">
|
||||
<div class="contents_wrap">
|
||||
<div class="top_wrap">
|
||||
<h3 class="title">날짜별 통계</h3>
|
||||
<p class="breadcrumb">발송통계 > 날짜별 통계</p>
|
||||
</div>
|
||||
|
||||
<div class="top_tab">
|
||||
<a href="javascript:void(0);" @click="toMove('monthList')">월별통계</a>
|
||||
<a href="javascript:void(0);" class="on">일별통계</a>
|
||||
</div>
|
||||
|
||||
|
||||
<form autocomplete="off" class="search_form">
|
||||
<div class="search_wrap">
|
||||
<div class="input_box cal">
|
||||
<label for="right" class="label txt">날짜</label>
|
||||
<p> 최대 1개월까지 조회 가능합니다.</p>
|
||||
<div class="term">
|
||||
<span class="custom_input icon_date">
|
||||
<vuejs-datepicker
|
||||
:language="ko"
|
||||
:format="customFormatter"
|
||||
:disabled-dates="disabledSDate"
|
||||
v-model="startDate"
|
||||
@selected="selectedStartDate(0)"
|
||||
@closed="closeDate('start')"
|
||||
></vuejs-datepicker>
|
||||
</span>~
|
||||
<span class="custom_input icon_date">
|
||||
<vuejs-datepicker
|
||||
:language="ko"
|
||||
:format="customFormatter"
|
||||
:disabled-dates="disabledEDate"
|
||||
v-model="endDate"
|
||||
@selected="selectedEndDate(0)"
|
||||
@closed="closeDate('end')"
|
||||
></vuejs-datepicker>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="button grey" @click="search">조회</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="info">
|
||||
<div class="count">집계결과</div>
|
||||
<div class="button_group">
|
||||
<button type="button" class="button blue download">엑셀 다운로드</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="table calculate">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col width="7%">
|
||||
<col width="9.3%">
|
||||
<col width="9.3%">
|
||||
<col width="9.3%">
|
||||
<col width="9.3%">
|
||||
<col width="9.3%">
|
||||
<col width="9.3%">
|
||||
<col width="9.3%">
|
||||
<col width="9.3%">
|
||||
<col width="9.3%">
|
||||
<col width="9.3%">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="2">날짜</th>
|
||||
<th colspan="2">전체</th>
|
||||
<th colspan="2">SMS</th>
|
||||
<th colspan="2">LMS</th>
|
||||
<th colspan="2">MMS</th>
|
||||
<th colspan="2">알림톡</th>
|
||||
</tr>
|
||||
<tr class="total">
|
||||
<th>발송건수</th>
|
||||
<th>성공건수/(%)</th>
|
||||
<th>발송건수</th>
|
||||
<th>성공건수/(%)</th>
|
||||
<th>발송건수</th>
|
||||
<th>성공건수/(%)</th>
|
||||
<th>발송건수</th>
|
||||
<th>성공건수/(%)</th>
|
||||
<th>발송건수</th>
|
||||
<th>성공건수/(%)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(option, i) in list" v-bind:key="i">
|
||||
<td>{{ option.sumYmd }}</td>
|
||||
<td>{{ option.sndCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||
<td>{{ option.succCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRt }}%)</td>
|
||||
<td>{{ option.sndCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||
<td>{{ option.succCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRtS }}%)</td>
|
||||
<td>{{ option.sndCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||
<td>{{ option.succCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRtL }}%)</td>
|
||||
<td>{{ option.sndCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||
<td>{{ option.succCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRtM }}%)</td>
|
||||
<td>{{ option.sndCntR.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||
<td>{{ option.succCntR.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRtR }}%)</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<common-modal ref="commmonModal"></common-modal>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import moment from 'moment';
|
||||
import statsApi from "../service/statsApi.js";
|
||||
import xlsx from '@/common/excel';
|
||||
import commonModal from "@/components/modal/commonModal";
|
||||
|
||||
export default {
|
||||
name: 'dayList',
|
||||
data() {
|
||||
return {
|
||||
// 달력 데이터
|
||||
ko: vdp_translation_ko.js,
|
||||
periodDay: 7,
|
||||
sDateDiv: 'day',
|
||||
startDate: new Date(),
|
||||
endDate: new Date(),
|
||||
|
||||
startDt:'',
|
||||
endDt:'',
|
||||
|
||||
row: {},
|
||||
list:[],
|
||||
totalCnt: '',
|
||||
};
|
||||
},
|
||||
components: {
|
||||
commonModal,
|
||||
vuejsDatepicker,
|
||||
},
|
||||
created(){
|
||||
this.$store.commit("login/isLogin", true);
|
||||
this.$store.commit("login/isAuthChk", true);
|
||||
// this.startDt = moment().format('YYYY-MM-DD');
|
||||
// this.endDt = moment().format('YYYY-MM-DD');
|
||||
this.setPeriodDay(0);
|
||||
this.getDayList();
|
||||
},
|
||||
destroyed() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
async getDayList(){
|
||||
console.log('getDayList Start');
|
||||
this.row.startDay = moment(this.startDate).format('YYYYMMDD');
|
||||
this.row.endDay = moment(this.endDate).format('YYYYMMDD');
|
||||
console.log('검색_시작일시(변환후):'+this.row.startDay);
|
||||
console.log('검색_종료일시(변환후):'+this.row.endDay);
|
||||
if (moment(this.row.startDay).isBefore(moment(this.row.endDay).subtract(1, 'months').format('YYYYMMDD'))) {
|
||||
//alert('검색 기간은 최대 1개월까지 선택 가능 합니다.');
|
||||
this.row.title = '발송통계';
|
||||
this.row.msg1 = '검색 기간은 최대 1개월까지 선택 가능 합니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false
|
||||
}
|
||||
|
||||
try {
|
||||
const response = await statsApi.dayList(this.row);
|
||||
const result = response.data;
|
||||
console.log(result);
|
||||
if (result != null && result.retCode == "0000") {
|
||||
if(result.data.list.length > 0){
|
||||
this.list = result.data.list;
|
||||
}
|
||||
this.totalCnt = result.data.list.length;
|
||||
} else {
|
||||
alert("조회정보가 없습니다.");
|
||||
}
|
||||
} catch(err) {
|
||||
alert("실패 하였습니다.");
|
||||
}
|
||||
},
|
||||
toMove(routeName) {
|
||||
this.$router.push({ name: routeName, params: { page: 1, searchText: '' } });
|
||||
},
|
||||
search: function() {
|
||||
console.log('검색_시작일시:'+this.startDt);
|
||||
console.log('검색_종료일시:'+this.endDt);
|
||||
this.getDayList();
|
||||
},
|
||||
// calendarCalbackFnc(year, month, day){
|
||||
|
||||
// if(this.openStartPicker){
|
||||
// this.startDate= year +''+ month +''+ day
|
||||
// if(Number(this.endDate) < Number(this.startDate) && this.endDate !== 0){
|
||||
// this.row.title = '발송통계';
|
||||
// this.row.msg1 = '조회 시작일이 종료일보다 큽니다.';
|
||||
// this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
// this.openStartPicker = false
|
||||
// return false
|
||||
// }
|
||||
// this.startDt = year + '-' + month + '-' + day
|
||||
// this.openStartPicker = false
|
||||
// }
|
||||
// if(this.openEndPicker){
|
||||
// this.endDate=year +''+ month +''+ day
|
||||
// if(Number(this.endDate) < Number(this.startDate) && this.startDate !== 0){
|
||||
// this.row.title = '발송통계';
|
||||
// this.row.msg1 = '조회 종료일이 시작일보다 작습니다.';
|
||||
// this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
// this.openEndPicker = false
|
||||
// return false
|
||||
// }
|
||||
// this.endDt = year + '-' + month + '-' + day
|
||||
// this.openEndPicker = false
|
||||
// }
|
||||
// },
|
||||
|
||||
setPeriodDay(day) {
|
||||
this.periodDay = day;
|
||||
this.endDate = new Date();
|
||||
this.startDate = moment(this.endDate)
|
||||
.subtract(day, 'day')
|
||||
.toDate();
|
||||
|
||||
this.closeDate('start');
|
||||
this.closeDate('end');
|
||||
},
|
||||
selectedStartDate(day) {
|
||||
if (day != undefined && day != null) {
|
||||
this.periodDay = day;
|
||||
}
|
||||
if (this.startDate > this.endDate) {
|
||||
this.startDate = this.endDate;
|
||||
}
|
||||
console.log(this.disabledSDate)
|
||||
// this.grid.params.startDt = day
|
||||
},
|
||||
selectedEndDate(day) {
|
||||
if (day != undefined && day != null) {
|
||||
this.periodDay = day;
|
||||
}
|
||||
},
|
||||
closeDate(type) {
|
||||
if (type != undefined && type != null) {
|
||||
if (type == 'start') {
|
||||
this.disabledSDate = { from: this.endDate };
|
||||
this.disabledEDate = { to: this.startDate, from: this.endDate };
|
||||
} else if (type == 'end') {
|
||||
this.disabledSDate = { from: this.endDate };
|
||||
this.disabledEDate = { to: this.startDate, from: new Date() };
|
||||
}
|
||||
}
|
||||
},
|
||||
customFormatter: function(date) {
|
||||
if (this.sDateDiv == 'month') {
|
||||
return moment(date).format('YYYY-MM');
|
||||
} else if (this.sDateDiv == 'year') {
|
||||
return moment(date).format('YYYY');
|
||||
} else {
|
||||
return moment(date).format('YYYY-MM-DD');
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -1,234 +1,285 @@
|
||||
<template>
|
||||
<div class="contents">
|
||||
<div class="contents_wrap">
|
||||
<div class="top_wrap">
|
||||
<h3 class="title">날짜별 통계</h3>
|
||||
<p class="breadcrumb">발송통계 > 날짜별 통계</p>
|
||||
</div>
|
||||
|
||||
<div class="top_tab">
|
||||
<a href="javascript:void(0);" class="on">월별통계</a>
|
||||
<a href="javascript:void(0);" @click="toMove('dayList')" >일별통계</a>
|
||||
</div>
|
||||
|
||||
|
||||
<form autocomplete="off" class="search_form">
|
||||
<div class="search_wrap">
|
||||
<div class="input_box cal">
|
||||
<label for="right" class="label txt">날짜</label>
|
||||
<p> 최대 3개월까지 조회 가능합니다.</p>
|
||||
<div class="term">
|
||||
|
||||
<div class="group" style="width:500px;">
|
||||
|
||||
<span class="custom_input icon_date">
|
||||
<vuejs-datepicker
|
||||
:language="ko"
|
||||
:format="customFormatter"
|
||||
:disabled-dates="disabledSDate"
|
||||
:minimumView="sDateDiv"
|
||||
:maximumView="sDateDiv"
|
||||
v-model="startDate"
|
||||
@selected="selectedStartDate(0)"
|
||||
@closed="closeDate('start')"
|
||||
></vuejs-datepicker>
|
||||
</span>~
|
||||
<span class="custom_input icon_date">
|
||||
<vuejs-datepicker
|
||||
:language="ko"
|
||||
:format="customFormatter"
|
||||
:disabled-dates="disabledEDate"
|
||||
:minimumView="sDateDiv"
|
||||
:maximumView="sDateDiv"
|
||||
v-model="endDate"
|
||||
@selected="selectedEndDate(0)"
|
||||
@closed="closeDate('end')"
|
||||
></vuejs-datepicker>
|
||||
</span>
|
||||
|
||||
<div class="contents">
|
||||
<div class="contents_wrap">
|
||||
<div class="top_wrap">
|
||||
<h3 class="title">날짜별 통계</h3>
|
||||
<p class="breadcrumb">발송통계 > 날짜별 통계</p>
|
||||
</div>
|
||||
<button type="button" class="button grey" @click="search">조회</button>
|
||||
|
||||
<div class="top_tab">
|
||||
<a href="statistics_date.html" class="on">월별통계</a><a href="statistics_date_day.html">일별통계</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!--<button type="button" class="button grey">조회</button>-->
|
||||
</div>
|
||||
</form>
|
||||
<div class="info">
|
||||
<div class="count">집계결과</div>
|
||||
<div class="button_group">
|
||||
<button type="button" class="button blue download">엑셀 다운로드</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="table calculate">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col width="7%">
|
||||
<col width="9.3%">
|
||||
<col width="9.3%">
|
||||
<col width="9.3%">
|
||||
<col width="9.3%">
|
||||
<col width="9.3%">
|
||||
<col width="9.3%">
|
||||
<col width="9.3%">
|
||||
<col width="9.3%">
|
||||
<col width="9.3%">
|
||||
<col width="9.3%">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="2">날짜</th>
|
||||
<th colspan="2">전체</th>
|
||||
<th colspan="2">SMS</th>
|
||||
<th colspan="2">LMS</th>
|
||||
<th colspan="2">MMS</th>
|
||||
<th colspan="2">알림톡</th>
|
||||
</tr>
|
||||
<tr class="total">
|
||||
<th>발송건수</th>
|
||||
<th>성공건수/(%)</th>
|
||||
<th>발송건수</th>
|
||||
<th>성공건수/(%)</th>
|
||||
<th>발송건수</th>
|
||||
<th>성공건수/(%)</th>
|
||||
<th>발송건수</th>
|
||||
<th>성공건수/(%)</th>
|
||||
<th>발송건수</th>
|
||||
<th>성공건수/(%)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(option, i) in list" v-bind:key="i">
|
||||
<td>{{ option.sumYm }}</td>
|
||||
<td>{{ option.sndCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||
<td>{{ option.succCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRt }}%)</td>
|
||||
<td>{{ option.sndCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||
<td>{{ option.succCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRtS }}%)</td>
|
||||
<td>{{ option.sndCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||
<td>{{ option.succCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRtL }}%)</td>
|
||||
<td>{{ option.sndCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||
<td>{{ option.succCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRtM }}%)</td>
|
||||
<td>{{ option.sndCntR.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||
<td>{{ option.succCntR.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRtR }}%)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<form autocomplete="off" class="search_form">
|
||||
<div class="search_wrap">
|
||||
<div class="input_box cal">
|
||||
<label for="right" class="label txt">날짜</label>
|
||||
<p> 최대 3개월까지 조회 가능합니다.</p>
|
||||
<div class="term">
|
||||
<input class="date" type="text" id="" placeholder="2022-10-12"/>
|
||||
~
|
||||
<input class="" type="text" id="" placeholder="2022-10-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="button grey">조회</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="info">
|
||||
<div class="count">집계결과</div>
|
||||
<div class="button_group">
|
||||
<button type="button" class="button blue download">엑셀 다운로드</button>
|
||||
</div>
|
||||
<common-modal ref="commmonModal"></common-modal>
|
||||
|
||||
</div>
|
||||
<div class="table calculate">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col width="8%">
|
||||
<col width="9.2%">
|
||||
<col width="9.2%">
|
||||
<col width="9.2%">
|
||||
<col width="9.2%">
|
||||
<col width="9.2%">
|
||||
<col width="9.2%">
|
||||
<col width="9.2%">
|
||||
<col width="9.2%">
|
||||
<col width="9.2%">
|
||||
<col width="9.2%">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="2">날짜</th>
|
||||
<th colspan="2">전체</th>
|
||||
<th colspan="2">SMS</th>
|
||||
<th colspan="2">LMS</th>
|
||||
<th colspan="2">MMS</th>
|
||||
<th colspan="2">알림톡</th>
|
||||
</tr>
|
||||
<tr class="total">
|
||||
<th>발송건수</th>
|
||||
<th>성공건수/(%)</th>
|
||||
<th>발송건수</th>
|
||||
<th>성공건수/(%)</th>
|
||||
<th>발송건수</th>
|
||||
<th>성공건수/(%)</th>
|
||||
<th>발송건수</th>
|
||||
<th>성공건수/(%)</th>
|
||||
<th>발송건수</th>
|
||||
<th>성공건수/(%)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>전체</td>
|
||||
<td>84,000,000</td>
|
||||
<td>84,000,000<br>(100%)</td>
|
||||
<td>21,000,000</td>
|
||||
<td>21,000,000<br>(100%)</td>
|
||||
<td>21,000,000</td>
|
||||
<td>21,000,000<br>(100%)</td>
|
||||
<td>21,000,000</td>
|
||||
<td>21,000,000<br>(100%)</td>
|
||||
<td>21,000,000</td>
|
||||
<td>21,000,000<br>(100%)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2022-03</td>
|
||||
<td>40,000,000</td>
|
||||
<td>40,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2022-02</td>
|
||||
<td>40,000,000</td>
|
||||
<td>40,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2022-01</td>
|
||||
<td>40,000,000</td>
|
||||
<td>40,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2021-12</td>
|
||||
<td>40,000,000</td>
|
||||
<td>40,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2021-11</td>
|
||||
<td>40,000,000</td>
|
||||
<td>40,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2021-10</td>
|
||||
<td>40,000,000</td>
|
||||
<td>40,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2021-09</td>
|
||||
<td>40,000,000</td>
|
||||
<td>40,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2021-08</td>
|
||||
<td>40,000,000</td>
|
||||
<td>40,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2021-07</td>
|
||||
<td>40,000,000</td>
|
||||
<td>40,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
<td>10,000,000</td>
|
||||
<td>10,000,000<br>(100%)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import customGrid from '@/components/CustomGrid';
|
||||
//import api from '../service/api';
|
||||
import moment from 'moment';
|
||||
import statsApi from "../service/statsApi.js";
|
||||
import xlsx from '@/common/excel';
|
||||
import commonModal from "@/components/modal/commonModal";
|
||||
// import DatePicker from "vue2-datepicker";
|
||||
|
||||
export default {
|
||||
name: 'monthList',
|
||||
data() {
|
||||
return {
|
||||
// 달력 데이터
|
||||
ko: vdp_translation_ko.js,
|
||||
periodDay: 7,
|
||||
sDateDiv: 'month',
|
||||
startDate: new Date(),
|
||||
endDate: new Date(),
|
||||
|
||||
startDt:'',
|
||||
endDt:'',
|
||||
startYear:'',
|
||||
startMonth:'',
|
||||
endYear:'',
|
||||
endMonth:'',
|
||||
row: {},
|
||||
list:[],
|
||||
totalCnt: '',
|
||||
};
|
||||
},
|
||||
components: {
|
||||
commonModal,
|
||||
vuejsDatepicker,
|
||||
},
|
||||
components: {
|
||||
customGrid: customGrid
|
||||
created(){
|
||||
this.$store.commit("login/isLogin", true);
|
||||
this.$store.commit("login/isAuthChk", true);
|
||||
this.setPeriodDay(0);
|
||||
this.getMonthList();
|
||||
},
|
||||
destroyed() {
|
||||
|
||||
destroyed() {
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
async getMonthList(){
|
||||
|
||||
console.log('getMonthList Start');
|
||||
this.row.startMon = moment(this.startDate).format('YYYYMM');
|
||||
this.row.endMon = moment(this.endDate).format('YYYYMM');
|
||||
console.log('검색_시작년월:'+this.row.startMon);
|
||||
console.log('검색_종료년월:'+this.row.endMon);
|
||||
|
||||
if (moment(this.row.startMon).isBefore(moment(this.row.endMon).subtract(2, 'months').format('YYYYMM'))) {
|
||||
//alert('검색 기간은 최대 3개월까지 선택 가능 합니다.');
|
||||
this.row.title = '발송통계';
|
||||
this.row.msg1 = '검색 기간은 최대 3개월까지 선택 가능 합니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false
|
||||
}
|
||||
|
||||
try {
|
||||
const response = await statsApi.monthList(this.row);
|
||||
const result = response.data;
|
||||
console.log(result);
|
||||
if (result != null && result.retCode == "0000") {
|
||||
this.list = result.data.list;
|
||||
this.totalCnt = result.data.list.length;
|
||||
} else {
|
||||
alert("조회정보가 없습니다.");
|
||||
}
|
||||
} catch(err) {
|
||||
alert("실패 하였습니다.");
|
||||
}
|
||||
},
|
||||
search: function() {
|
||||
this.getMonthList();
|
||||
},
|
||||
toMove(routeName) {
|
||||
//this.$router.push({ name: routeName, params: { page: 1, searchText: '' } });
|
||||
this.$router.push({ name: routeName, params: {} });
|
||||
},
|
||||
|
||||
// disabledStDate(date) {
|
||||
// date = moment(String(date)).format('YYYYMMDD');
|
||||
// return date > moment().format('YYYYMMDD') || date < moment().add(-1, 'years').format('YYYYMMDD');
|
||||
// },
|
||||
// disabledEdDate(date) {
|
||||
// date = moment(String(date)).format('YYYYMMDD')
|
||||
// return date > moment().format('YYYYMMDD') || date < this.searchData.startDate ;
|
||||
// },
|
||||
// changeDate(type) {
|
||||
// if (type === 'start') {
|
||||
// if (this.endDate === null || this.startDate > this.endDate) {
|
||||
// this.endDate = this.startDate;
|
||||
// }
|
||||
// if (moment(this.startDate).isBefore(moment(this.endDate).subtract(2, 'months').format('YYYYMMDD'))) {
|
||||
// alert('검색 기간은 최대 3개월까지 선택 가능 합니다.');
|
||||
// this.startDate = moment(this.endDate).subtract(2, 'months').format('YYYYMMDD');
|
||||
// }
|
||||
// } else if (type === 'end') {
|
||||
// if (this.startDate === null || this.startDate > this.endDate) {
|
||||
// this.startDate = this.endDate;
|
||||
// }
|
||||
// if (moment(this.endDate).isAfter(moment(this.startDate).add(2, 'months').format('YYYYMMDD'))) {
|
||||
// alert('검색 기간은 최대 3개월까지 선택 가능 합니다.')
|
||||
// this.endDate = moment(this.startDate).add(2, 'months').format('YYYYMMDD');
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
|
||||
setPeriodDay(day) {
|
||||
this.periodDay = day;
|
||||
this.endDate = new Date();
|
||||
this.startDate = moment(this.endDate)
|
||||
.subtract(day, 'day')
|
||||
.toDate();
|
||||
|
||||
this.closeDate('start');
|
||||
this.closeDate('end');
|
||||
},
|
||||
selectedStartDate(day) {
|
||||
if (day != undefined && day != null) {
|
||||
this.periodDay = day;
|
||||
}
|
||||
if (this.startDate > this.endDate) {
|
||||
this.startDate = this.endDate;
|
||||
}
|
||||
console.log(this.disabledSDate)
|
||||
// this.grid.params.startDt = day
|
||||
},
|
||||
selectedEndDate(day) {
|
||||
if (day != undefined && day != null) {
|
||||
this.periodDay = day;
|
||||
}
|
||||
},
|
||||
closeDate(type) {
|
||||
if (type != undefined && type != null) {
|
||||
if (type == 'start') {
|
||||
this.disabledSDate = { from: this.endDate };
|
||||
this.disabledEDate = { to: this.startDate, from: this.endDate };
|
||||
} else if (type == 'end') {
|
||||
this.disabledSDate = { from: this.endDate };
|
||||
this.disabledEDate = { to: this.startDate, from: new Date() };
|
||||
}
|
||||
}
|
||||
},
|
||||
customFormatter: function(date) {
|
||||
if (this.sDateDiv == 'month') {
|
||||
return moment(date).format('YYYY-MM');
|
||||
} else if (this.sDateDiv == 'year') {
|
||||
return moment(date).format('YYYY');
|
||||
} else {
|
||||
return moment(date).format('YYYY-MM-DD');
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
</script>
|
||||
<style>
|
||||
</style>
|
||||
Reference in New Issue
Block a user