리스크관리 / 발송통계 추가

This commit is contained in:
kimre
2022-06-29 17:52:26 +09:00
parent 056ccf20e1
commit 0a2e30b1c2
32 changed files with 2864 additions and 992 deletions

View File

@@ -0,0 +1,72 @@
@charset "utf-8";
/* CSS Document */
@font-face {
font-family: 'SpoqaHanSansNeo';
src: url('../font/SpoqaHanSansNeo-Thin.woff2') format('woff2');
font-weight: 100;
font-style: normal;
}
@font-face {
font-family: 'SpoqaHanSansNeo';
src: url('../font/SpoqaHanSansNeo-Light.woff2') format('woff2');
font-weight: 300;
font-style: normal;
}
@font-face {
font-family: 'SpoqaHanSansNeo';
src: url('../font/SpoqaHanSansNeo-Regular.woff2') format('woff2');
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: 'SpoqaHanSansNeo';
src: url('../font/SpoqaHanSansNeo-Medium.woff2') format('woff2');
font-weight: 500;
font-style: normal;
}
@font-face {
font-family: 'SpoqaHanSansNeo';
src: url('../font/SpoqaHanSansNeo-Bold.woff2') format('woff2');
font-weight: 700;
font-style: normal;
}
.error-wrap {background: #fff; text-align: center; padding:0; margin: 0 auto; font-family: 'SpoqaHanSansNeo';
width:90vw; height:90vh; position: relative; }
.error-body { width:450px; max-width: 98%; margin: 0 auto; text-align: center; position: absolute; top:50%;transform: translate(0, -50%); left:calc(50% - 225px); }
.error-body > .header { font-weight: 700; font-size: 2.5em; margin: 30px 0 20px 0;}
.error-body > .message { font-weight: 400; font-size:1em; line-height: 150%;}
.error-body > .error-btns { width:100%; display: flex;text-align: center; margin-top: 3em; }
.error-body > .error-btns a:nth-child(1) {background: #eb008b; border:1px solid #eb008b; font-weight: 400; font-size:1em; line-height: 150%; border-radius: 5px; color:#fff; text-decoration:none;padding: 10px 0; width: 50%; }
.error-body > .error-btns a:nth-child(2) { display: inline-block; background: #fff; border:1px solid #282828; font-weight: 400; font-size:1em; line-height: 150%; border-radius: 5px; color:#000; text-decoration:none; padding: 10px 0; width: 50%; margin-left: 10px; }
@media only screen and (max-width: 550px) {
.error-body { max-width: 98%; margin: 0 auto; text-align: center; position: relative; top:3em; left:auto; transform: none;}
}
@media only screen and (max-width: 414px) {
.error-body > img { width:6em;}
.error-body > .header {font-size: 1.6em; letter-spacing: -0.05em; margin: 20px 0 10px 0;}
.error-body > .message {font-size:0.9em; letter-spacing: -0.05em;}
}
@media only screen and (max-width: 280px) {
.error-body > img { width:6em;}
.error-body > .header {font-size: 1.35em; letter-spacing: -0.05em; margin: 20px 0 10px 0;}
.error-body > .message {font-size:0.9em; letter-spacing: -0.05em; line-height: 140%;}
.error-body > .error-btns { margin-top: 2em; }
}

View File

@@ -539,95 +539,62 @@ header .user_wrap .user_info .logout {
}
/* input cal + search-box*/
/*.w35{width:35%;}*/
/*.contents .table.table_form.m50{margin-bottom: 50px;}*/
.w35{width:35%;}
.contents .table.table_form.m50{margin-bottom: 50px;}
/*.contents .input_box.cal{*/
/* display: inline-block;*/
/* width: 27.34%;*/
/*}*/
/*.contents .input_box.cal label {*/
/* display: block;*/
/*}*/
/*.contents .input_box.cal .txt{*/
/* display: inline-block;*/
/*}*/
/*.contents .input_box.cal p{*/
/* display: inline-flex;*/
/* margin-left: 10px;*/
/*}*/
/*.contents .input_box.cal input {*/
/* display: inline-block;*/
/* width: 48%;*/
/* float: left;*/
/* background: #fff url(../images/icon-calender.png) no-repeat right 6% center;*/
/*}*/
/*.contents .input_box.cal input {*/
/* display: inline-block;*/
/* width: 48%;*/
/* float: left;*/
/* background: #fff url(../images/icon-calender.png) no-repeat right 6% center;*/
/*}*/
/*.contents .input_box.cal span {*/
/* display: inline-block;*/
/* width: 48%;*/
/* float: left;*/
/* background: #fff url(../images/icon-calender.png) no-repeat right 6% center;*/
/*}*/
.custom_input.icon_date input[type="text"] {
width: 52%;
float: left;
background: #fff url(../images/icon-calender.png) no-repeat right 6% center;
}
.custom_input.icon_date input[type="text"]:focus {
border-color: #cccccc;
background-color: #f6f6f6;
color: #898989;
.contents .input_box.cal{
display: inline-block;
width: 27.34%;
}
.contents .input_box.cal span + input{
.contents .input_box.cal label {
display: block;
}
.contents .input_box.cal .txt{
display: inline-block;
}
.contents .input_box.cal p{
display: inline-flex;
margin-left: 10px;
}
.contents .input_box.cal input {
display: inline-block;
width: 48%;
float: left;
background: #fff url(../images/icon-calender.png) no-repeat right 6% center;
}
.contents .input_box.cal input + input{
margin-left: 5%;
}
.vdp-datepicker__calendar header {
display: block;
line-height: 40px;
height: 40px;
.contents .input_box.cal.one{
width: 13.67%;
}
/*.contents .input_box.cal input + input{*/
/* margin-left: 5%;*/
/*}*/
.contents .input_box.cal.one input{
width: 100%;
}
/*.contents .input_box.cal.one{*/
/* width: 13.67%;*/
/*}*/
.contents .input_box.cal.one + .btn-a{
margin-right: 10px;
}
/*.contents .input_box.cal.one input{*/
/* width: 100%;*/
/*}*/
.contents .input_box.cal .term{
display: flex;
justify-content: space-around;
align-items: center;
}
/*.contents .input_box.cal.one + .btn-a{*/
/* margin-right: 10px;*/
/*}*/
.contents .input_box.cal .term input:nth-child(1){
margin-right: 4%;
}
/*.contents .input_box.cal .term{*/
/* display: flex;*/
/* justify-content: space-around;*/
/* align-items: center;*/
/*}*/
.vdp-datepicker__calendar div {margin-top:80px;}
/*.contents .input_box.cal .term input:nth-child(1){*/
/* margin-right: 4%;*/
/*}*/
/*.vdp-datepicker__calendar div*/
.contents .input_box .search-box {
background: #fff url(../images/icon-search.png) no-repeat 6% center/14px auto;
@@ -904,6 +871,8 @@ header .user_wrap .user_info .logout {
/*contents table 추가*/
/* arrow_box 반려사유 삭제 */
/*
.contents .table table .arrow_box {
display: none;
background-color: #fff;
@@ -946,6 +915,7 @@ header .user_wrap .user_info .logout {
width: 0;
z-index: 1;
}
*/
.contents .table.calculate table td, .contents .table.calculate table th{
border-left: 1px solid #dadae6;
@@ -976,10 +946,6 @@ header .user_wrap .user_info .logout {
.contents .table table td span {cursor: pointer;}
.contents .table table td .linkstyle {cursor: pointer; text-decoration: underline;}
.contents .table table td .linkstyle:hover {color:#eb008b;}
.contents .table table td span:hover + p.arrow_box {
display: block;
}
@@ -1593,10 +1559,10 @@ header .user_wrap .user_info .logout {
background: url(../images/icon-add-b.png) no-repeat center center;
}
/*.popup.popup_form.register .input_add div:nth-child(2){*/
/* width: 89%;*/
/* padding-top: 5px;*/
/*}*/
.popup.popup_form.register .input_add div:nth-child(2){
width: 89%;
padding-top: 5px;
}
.popup .button.white{
background-color: #fff;

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@@ -1,4 +1,4 @@
<template>
<template>
<header>
<h1 class="logo"><a href="javascript:void(0)">uplus 메시지허브이지<span>BACKOFFICE</span></a></h1>
<div class="user_wrap">
@@ -11,7 +11,7 @@
<a href="javascript:void(0)" class="logout" @click="logout();">로그아웃</a>
</div>
</div>
</header>
</header>
</template>
<script>
@@ -29,8 +29,8 @@ export default {
navActive: false,
}
},
created() {
created() {
},
computed: {
...mapGetters({
@@ -45,6 +45,7 @@ export default {
//this.setMenuData();
} else {
this.isLogin = false;
window.top.location.href = '/';
//this.menuList = null;
}
},
@@ -53,6 +54,7 @@ export default {
this.isErrPage = true;
} else {
this.isErrPage = false;
window.top.location.href = '/';
}
},
},

View File

@@ -9,10 +9,10 @@
<ul class="sub_menu" v-if="child.children.length > 0">
<li v-for="child2 in child.children" :key="child2.menuNo">
<a href="javascript:void(0);" @click="clickMenu(child2.menuUrl)" :data-menu-no="child2.menuNo">{{child2.menuNm}}</a>
</li>
</li>
</ul>
</div>
</li>
</li>
</ul>
</nav>
</template>
@@ -20,37 +20,68 @@
<script>
//import "../assets/js/script.js";
import api from '@/service/api.js';
// import api from "@/service/api";
// import loginApi from "@/modules/login/service/api"
import tokenSvc from '@/common/token-service';
import { mapGetters } from 'vuex';
export default {
name: 'Nav',
props: {
},
data() {
return {
isLogin : false,
isAuthChk : false,
isErrPage: false,
navActive: false,
menuList: [],
tempList: []
}
},
created() {
// 메뉴 가져오기
created() {
this.isLogin = !!tokenSvc.getToken();
let curPage = location.pathname;
if (this.isLogin && curPage != "/login") {
this.$store.commit("login/isLogin", true);
this.setMenuData();
} else {
this.$store.commit("login/isLogin", false);
this.isLogin = false;
}
},
mounted() {},
computed: {
...mapGetters({
getLogin: 'login/isLogin',
getErrorPage: 'login/isErrorPage',
}),
},
watch: {
getLogin(data) {
if (data != null && data != '' && data == true) {
this.isLogin = true;
this.setMenuData();
} else {
this.isLogin = false;
this.menuList = null;
}
},
getErrorPage(data) {
if (data != null && data != '' && data == true) {
this.isErrPage = true;
} else {
this.isErrPage = false;
}
},
},
methods: {
setMenuData() {
api.menus().then(response => {
const rootMenu = response.data.data;
console.log(rootMenu);
console.log(rootMenu);
if (rootMenu != null && rootMenu.children != null && rootMenu.children.length > 0) {
this.tempList = rootMenu.children;
for(var i=0; i<this.tempList.length; i++){
@@ -73,32 +104,51 @@ export default {
//console.log(classNm);
}
//this.menuList = rootMenu.children;
//this.menuList = rootMenu.children;
this.menuList = this.tempList;
//this.$store.commit("login/isLogin", true);
//this.$store.commit("login/isAuthChk", true);
} else {
window.top.location.href = '/';
}
});
},
clickMenu(link){
var location = this.$route.fullPath;
console.log(location)
if(location.contains(classNm)){
}
//this.$store.commit("login/isLogin", true);
//this.$store.commit("login/isAuthChk", true);
} else {
window.top.location.href = '/';
this.isLogin = false;
this.menuList = null;
}
}).catch(rsponse => {
this.isLogin = false;
this.menuList = null;
})
},
clickMenu(link){
var location = this.$route.fullPath;
if(link != location){
this.$router.push({
path: link
});
});
}
},
reload(){
var location = this.$route.fullPath;
if (location == "/" || location == "") {
// nothing
} else {
this.$router.replace('/');
this.$nextTick(() => this.$router.replace(location));
}
},
actionMenu(e){
const menuList = document.querySelectorAll('.main_menu .is-current');
const menuList = document.querySelectorAll('.main_menu .is-current');
if(e.target.classList.contains('menu_target') || e.target.classList.contains('menu_btn')){
const menuListCheck = e.target.parentNode;
if(menuListCheck.classList.contains('is-current')){
menuListCheck.classList.remove('is-current');
for(const menu of menuList){
menu.classList.remove('is-current');
}
@@ -106,12 +156,12 @@ export default {
for(const other of menuList){
other.classList.remove('is-current');
}
}
menuListCheck.classList.add('is-current');
}
}
},

View File

@@ -34,12 +34,32 @@
<p v-if="msg3 !== ''">{{ msg3 }}</p>
<p v-if="msg4 !== ''">{{ msg4 }}</p>
</div>
<div class="pop-btn2">
<div class="popup-btn2">
<button class="btn-pcolor" @click="confirmModalClose();">확인</button>
<button class="btn-default" @click="confirmModalCancel();">취소</button>
</div>
</div>
</div>
<div class="dimmed confirm2" @click="confirmModalCancel2();"></div>
<div class="popup-wrap confirm2">
<!-- 수정 확인 -->
<div class="popup confirm2">
<div class="pop-head">
<h3 class="popup-tit">{{title}}</h3>
</div>
<div class="pop-cont">
<p>{{ msg1 }}</p>
<p v-if="msg2 !== ''">{{ msg2 }}</p>
<p v-if="msg3 !== ''">{{ msg3 }}</p>
<p v-if="msg4 !== ''">{{ msg4 }}</p>
</div>
<div class="popup-btn2">
<button class="btn-pcolor" @click="confirmModalClose2();">확인</button>
<button class="btn-default" @click="confirmModalCancel2();">취소</button>
</div>
</div>
</div>
</div>
</template>
@@ -59,7 +79,6 @@ export default {
},
methods :{
alertModalOpen(props){
console.log(props)
var dimmed = document.getElementsByClassName('modal01');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'block';
@@ -89,6 +108,18 @@ export default {
dimmed[i].style.display = 'block';
}
this.title = props.title;
this.msg1 = props.msg1;
this.msg2 = props.msg2;
this.msg3 = props.msg3;
this.msg4 = props.msg4;
},
confirmModalOpen2(props){
var dimmed = document.getElementsByClassName('confirm2');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'block';
}
this.title = props.title;
this.msg1 = props.msg1;
this.msg2 = props.msg2;
@@ -102,6 +133,17 @@ export default {
dimmed[i].style.display = 'none';
}
this.row.result = true;
// 부모 함수 호출.
this.$parent.confirmCalbackFnc(this.row);
},
// 모달 끄기(ok)
confirmModalClose2(){
var dimmed = document.getElementsByClassName('confirm2');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none';
}
this.row.result = true;
// 부모 함수 호출.
this.$parent.confirmCalbackFnc(this.row);
@@ -113,6 +155,17 @@ export default {
dimmed[i].style.display = 'none';
}
this.row.result = false;
// 부모 함수 호출.
this.$parent.confirmCalbackFnc(this.row);
},
// 모달 끄기(취소)
confirmModalCancel2(){
var dimmed = document.getElementsByClassName('confirm2');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none';
}
this.row.result = false;
// 부모 함수 호출.
this.$parent.confirmCalbackFnc(this.row);

View File

@@ -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>

View File

@@ -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();
}
},
},

View File

@@ -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();
}
},

View File

@@ -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();
}
},

View File

@@ -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>

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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});
}
},

View File

@@ -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 }
},
]

View 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,
}

View File

@@ -0,0 +1,366 @@
<template>
<div class="contents">
<div class="contents_wrap">
<div class="top_wrap">
<h3 class="title">사업자별 통계</h3>
<p class="breadcrumb">발송통계 &gt; 사업자별 통계</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>

View File

@@ -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);
},
}
};

View File

@@ -0,0 +1,273 @@
<template>
<div class="contents">
<div class="contents_wrap">
<div class="top_wrap">
<h3 class="title">날짜별 통계</h3>
<p class="breadcrumb">발송통계 &gt; 날짜별 통계</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>

View File

@@ -1,234 +1,285 @@
<template>
<div class="contents">
<div class="contents_wrap">
<div class="top_wrap">
<h3 class="title">날짜별 통계</h3>
<p class="breadcrumb">발송통계 &gt; 날짜별 통계</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">발송통계 &gt; 날짜별 통계</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>

View File

@@ -1,6 +1,6 @@
<template>
<article id="content" class="content error_page">
<article id="content" class="content error_page">
<div class="error_wrap center">
<div class="title_area rcs_icon icon_error404">
<h2 class="h2_title">죄송합니다.<br>요청하신 페이지를 찾을 없습니다. (404 Error)</h2><span class="h2_desc mar_t20">존재하지 않는 주소를 입력하셨거나 기술적인 문제로 일시적으로 접속되지 않았습니다.<br>잠시 다시 이용 부탁드리며 이용에 불편을 드려 사과드립니다.</span>

View File

@@ -3,8 +3,8 @@
<div class="wrap" v-bind:class="{'main_wrap': (isLogin && isAuthChk), 'login-wrap': (!isLogin && !isAuthChk), 'bg-wrap': (isLogin && !isAuthChk) }" >
<hub-web-header v-if="isAuthChk == true"></hub-web-header>
<nav-bar v-if="isAuthChk == true"></nav-bar>
<router-view :key="$route.fullPath"></router-view>
<hub-web-footer v-if="isAuthChk == false"></hub-web-footer>
<router-view :key="$route.fullPath"></router-view>
<hub-web-footer v-if="isAuthChk == false"></hub-web-footer>
</div>
</body>
</template>
@@ -29,7 +29,7 @@ export default {
NavBar,
// vuejsDatepicker,
HubWebHeader,
HubWebFooter,
HubWebFooter,
},
data(){
return{
@@ -38,12 +38,12 @@ export default {
isAuthChk: false,
}
},
created() {
created() {
this.getLogin;
this.getAuthChk;
},
mounted() {
}
,computed: {
...mapGetters({
@@ -55,10 +55,10 @@ export default {
watch: {
getLogin(data) {
if (data != null && data != '' && data == true) {
this.isLogin = true;
this.isLogin = true;
} else {
this.isLogin = false;
}
this.isLogin = false;
}
},
getErrorPage(data) {
if (data != null && data != '' && data == true) {
@@ -67,12 +67,12 @@ export default {
this.isErrPage = false;
}
},
getAuthChk(data) {
getAuthChk(data) {
if (data != null && data != '' && data == true) {
this.isAuthChk = true;
this.isAuthChk = true;
} else {
this.isAuthChk = false;
}
this.isAuthChk = false;
}
},
}
};