유치채널 엑셀 다운로드 수정

This commit is contained in:
USER
2022-09-21 09:05:30 +09:00
parent 39622f7609
commit a3fb4e5a2c
6 changed files with 123 additions and 169 deletions

View File

@@ -223,17 +223,9 @@ export default {
created() { created() {
this.getExcelHeader(); this.getExcelHeader();
if(this.$route.params.userSeq != null){ //리스트에서 상세 호출 if(this.$route.params.userSeq != null){ //리스트에서 상세 호출
//this.loginId = this.$route.params.loginId;
this.$store.commit('dataStore/updateUserSeq', this.$route.params.userSeq); this.$store.commit('dataStore/updateUserSeq', this.$route.params.userSeq);
//this.$store.commit('dataStore/updateUserId', this.$route.params.userId);
this.channelDetail(this.$route.params.userSeq); this.channelDetail(this.$route.params.userSeq);
} }
// else{
// var userSeq = this.$store.getters["dataStore/getUserSeq"];
// var userId = this.$store.getters["dataStore/getUserId"];
// this.loginId = userId;
// this.channelDetail(userSeq);
// }
}, },
destroyed() { destroyed() {
this.$store.commit('dataStore/updateUserSeq', ''); this.$store.commit('dataStore/updateUserSeq', '');
@@ -242,6 +234,7 @@ export default {
methods: { methods: {
async channelDetail(userSeq) { async channelDetail(userSeq) {
this.row.userSeq = userSeq; this.row.userSeq = userSeq;
try { try {
const response = await channelMgtApi.channelDetail(this.row); const response = await channelMgtApi.channelDetail(this.row);
const result = response.data; const result = response.data;
@@ -323,6 +316,36 @@ export default {
let today = moment().format('YYYYMMDDHHmmss'); let today = moment().format('YYYYMMDDHHmmss');
const saveFileName = `유치고객발송건수_${today}.xls`; const saveFileName = `유치고객발송건수_${today}.xls`;
const data = await this.getExcelDataDown(); const data = await this.getExcelDataDown();
// 엑셀 합계 데이터 구하기
var sndCntTotal = 0;
var sndCntSTotal = 0;
var sndCntLTotal = 0;
var sndCntMTotal = 0;
var sndCntATotal = 0;
for (var i = 0; i < data.list.length; i++) {
sndCntTotal = sndCntTotal + Number(data.list[i].sndCnt);
sndCntSTotal = sndCntSTotal + Number(data.list[i].sndCntS);
sndCntLTotal = sndCntLTotal + Number(data.list[i].sndCntL);
sndCntMTotal = sndCntMTotal + Number(data.list[i].sndCntM);
sndCntATotal = sndCntATotal + Number(data.list[i].sndCntA);
}
console.log("sndCntTotal : "+ sndCntTotal);
console.log("sndCntSTotal : "+ sndCntSTotal);
console.log("sndCntLTotal : "+ sndCntLTotal);
console.log("sndCntMTotal : "+ sndCntMTotal);
console.log("sndCntATotal : "+ sndCntATotal);
let totalRow = {
'sumYm' : '합계',
'sndCnt' : sndCntTotal,
'sndCntA' : sndCntATotal,
'sndCntL' : sndCntLTotal,
'sndCntM' : sndCntMTotal,
'sndCntS' : sndCntSTotal
};
// 합계 데이터 추가
data.list.unshift(totalRow);
let options = { let options = {
header: this.excelHeader, header: this.excelHeader,
@@ -336,12 +359,7 @@ export default {
try { try {
let response; let response;
const params = { const params = {
// sndCntS: this.sndCntS, userSeq: this.row.userSeq
// sndCntL: this.sndCntL,
// sndCntM: this.sndCntM,
// sndCntA: this.sndCntA,
userSeq: this.userSeq
}; };
response = await channelMgtApi.sendNumberListExcel(params); response = await channelMgtApi.sendNumberListExcel(params);
@@ -357,9 +375,6 @@ export default {
} }
}, // end of getExcelDataDown }, // end of getExcelDataDown
goChannelList() { goChannelList() {
// this.row.userSeq = this.$route.params.userSeq;
// alert(this.row.userSeq);
this.$router.push({name: 'channelList'}); this.$router.push({name: 'channelList'});
}, },
searchIDPopOpen: function () { searchIDPopOpen: function () {

View File

@@ -259,11 +259,6 @@ export default {
this.userId = this.$route.params.serviceId; this.userId = this.$route.params.serviceId;
this.memberDetail(this.$route.params.serviceId); this.memberDetail(this.$route.params.serviceId);
} }
// else {
// var userId2 = this.$store.getters['dataStore/getUserId'];
// this.userId = userId2;
// this.memberDetail(this.userId);
// }
}, },
destroyed() { destroyed() {
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
@@ -303,12 +298,9 @@ export default {
this.$refs.commmonModal.confirmModalOpen(props); this.$refs.commmonModal.confirmModalOpen(props);
}, },
async memberDetail(serviceId) { async memberDetail(serviceId) {
console.log('2022.09.15');
console.log('serviceId : '+ serviceId);
this.svcUserId = serviceId; this.svcUserId = serviceId;
this.row.userId = serviceId; this.row.userId = serviceId;
console.log('this.row :');
console.log(this.row);
try { try {
const response = await custMgtApi.memberAdminDetail(this.row); const response = await custMgtApi.memberAdminDetail(this.row);
const result = response.data; const result = response.data;

View File

@@ -4,7 +4,8 @@
{ {
"key": "sumYmd", "key": "sumYmd",
"name": "날짜", "name": "날짜",
"rowspan": 2 "rowspan": 2,
"format": "dateFormat_yyyymmdd"
}, },
{ {
"key": "custNm", "key": "custNm",
@@ -18,85 +19,70 @@
}, },
{ {
"name": "전체", "name": "전체",
"colspan": 3 "colspan": 2
}, },
{ {
"name": "SMS", "name": "SMS",
"colspan": 3 "colspan": 2
}, },
{ {
"name": "LMS", "name": "LMS",
"colspan": 3 "colspan": 2
}, },
{ {
"name": "MMS", "name": "MMS",
"colspan": 3 "colspan": 2
}, },
{ {
"name": "알림톡", "name": "알림톡",
"colspan": 3 "colspan": 2
} }
], ],
[ [
{ {
"key": "sndCnt", "key": "sndCnt",
"name": "발송건수" "name": "발송건수",
"format": "Format_00"
}, },
{ {
"key": "succCnt", "key": "succCnt",
"name": "성공건수" "name": "성공건수"
}, },
{
"key": "succRt",
"name": "성공률(%)"
},
{ {
"key": "sndCntS", "key": "sndCntS",
"name": "발송건수" "name": "발송건수",
"format": "Format_00"
}, },
{ {
"key": "succCntS", "key": "succCntS",
"name": "성공건수" "name": "성공건수"
}, },
{
"key": "succRtS",
"name": "성공률(%)"
},
{ {
"key": "sndCntL", "key": "sndCntL",
"name": "발송건수" "name": "발송건수",
"format": "Format_00"
}, },
{ {
"key": "succCntL", "key": "succCntL",
"name": "성공건수" "name": "성공건수"
}, },
{
"key": "succRtL",
"name": "성공률(%)"
},
{ {
"key": "sndCntM", "key": "sndCntM",
"name": "발송건수" "name": "발송건수",
"format": "Format_00"
}, },
{ {
"key": "succCntM", "key": "succCntM",
"name": "성공건수" "name": "성공건수"
}, },
{
"key": "succRtM",
"name": "성공률(%)"
},
{ {
"key": "sndCntR", "key": "sndCntR",
"name": "발송건수" "name": "발송건수",
"format": "Format_00"
}, },
{ {
"key": "succCntR", "key": "succCntR",
"name": "성공건수" "name": "성공건수"
},
{
"key": "succRtR",
"name": "성공률(%)"
} }
] ]
] ]

View File

@@ -4,7 +4,8 @@
{ {
"key": "sumYm", "key": "sumYm",
"name": "날짜", "name": "날짜",
"rowspan": 2 "rowspan": 2,
"format": "dateFormat_yyyymm"
}, },
{ {
"key": "custNm", "key": "custNm",
@@ -18,85 +19,71 @@
}, },
{ {
"name": "전체", "name": "전체",
"colspan": 3 "colspan": 2
}, },
{ {
"name": "SMS", "name": "SMS",
"colspan": 3 "colspan": 2
}, },
{ {
"name": "LMS", "name": "LMS",
"colspan": 3 "colspan": 2,
"format": "Format_00"
}, },
{ {
"name": "MMS", "name": "MMS",
"colspan": 3 "colspan": 2
}, },
{ {
"name": "알림톡", "name": "알림톡",
"colspan": 3 "colspan": 2
} }
], ],
[ [
{ {
"key": "sndCnt", "key": "sndCnt",
"name": "발송건수" "name": "발송건수",
"format": "Format_00"
}, },
{ {
"key": "succCnt", "key": "succCnt",
"name": "성공건수" "name": "성공건수/(%)"
},
{
"key": "succRt",
"name": "성공률(%)"
}, },
{ {
"key": "sndCntS", "key": "sndCntS",
"name": "발송건수" "name": "발송건수",
"format": "Format_00"
}, },
{ {
"key": "succCntS", "key": "succCntS",
"name": "성공건수" "name": "성공건수/(%)"
},
{
"key": "succRtS",
"name": "성공률(%)"
}, },
{ {
"key": "sndCntL", "key": "sndCntL",
"name": "발송건수" "name": "발송건수",
"format": "Format_00"
}, },
{ {
"key": "succCntL", "key": "succCntL",
"name": "성공건수" "name": "성공건수/(%)"
},
{
"key": "succRtL",
"name": "성공률(%)"
}, },
{ {
"key": "sndCntM", "key": "sndCntM",
"name": "발송건수" "name": "발송건수",
"format": "Format_00"
}, },
{ {
"key": "succCntM", "key": "succCntM",
"name": "성공건수" "name": "성공건수/(%)"
},
{
"key": "succRtM",
"name": "성공률(%)"
}, },
{ {
"key": "sndCntR", "key": "sndCntR",
"name": "발송건수" "name": "발송건수",
"format": "Format_00"
}, },
{ {
"key": "succCntR", "key": "succCntR",
"name": "성공건수" "name": "성공건수/(%)"
},
{
"key": "succRtR",
"name": "성공률(%)"
} }
] ]
] ]

View File

@@ -4,89 +4,76 @@
{ {
"key": "sumYmd", "key": "sumYmd",
"name": "날짜", "name": "날짜",
"rowspan": 2 "rowspan": 2,
"format": "dateFormat_yyyymm"
}, },
{ {
"name": "전체", "name": "전체",
"colspan": 3 "colspan": 2
}, },
{ {
"name": "SMS", "name": "SMS",
"colspan": 3 "colspan": 2
}, },
{ {
"name": "LMS", "name": "LMS",
"colspan": 3 "colspan": 2,
"format": "Format_00"
}, },
{ {
"name": "MMS", "name": "MMS",
"colspan": 3 "colspan": 2
}, },
{ {
"name": "알림톡", "name": "알림톡",
"colspan": 3 "colspan": 2
} }
], ],
[ [
{ {
"key": "sndCnt", "key": "sndCnt",
"name": "발송건수" "name": "발송건수",
"format": "Format_00"
}, },
{ {
"key": "succCnt", "key": "succCnt",
"name": "성공건수" "name": "성공건수"
}, },
{
"key": "succRt",
"name": "성공률(%)"
},
{ {
"key": "sndCntS", "key": "sndCntS",
"name": "발송건수" "name": "발송건수",
"format": "Format_00"
}, },
{ {
"key": "succCntS", "key": "succCntS",
"name": "성공건수" "name": "성공건수"
}, },
{
"key": "succRtS",
"name": "성공률(%)"
},
{ {
"key": "sndCntL", "key": "sndCntL",
"name": "발송건수" "name": "발송건수",
"format": "Format_00"
}, },
{ {
"key": "succCntL", "key": "succCntL",
"name": "성공건수" "name": "성공건수"
}, },
{
"key": "succRtL",
"name": "성공률(%)"
},
{ {
"key": "sndCntM", "key": "sndCntM",
"name": "발송건수" "name": "발송건수",
"format": "Format_00"
}, },
{ {
"key": "succCntM", "key": "succCntM",
"name": "성공건수" "name": "성공건수"
}, },
{
"key": "succRtM",
"name": "성공률(%)"
},
{ {
"key": "sndCntR", "key": "sndCntR",
"name": "발송건수" "name": "발송건수",
"format": "Format_00"
}, },
{ {
"key": "succCntR", "key": "succCntR",
"name": "성공건수" "name": "성공건수"
},
{
"key": "succRtR",
"name": "성공률(%)"
} }
] ]
] ]

View File

@@ -4,89 +4,76 @@
{ {
"key": "sumYm", "key": "sumYm",
"name": "날짜", "name": "날짜",
"rowspan": 2 "rowspan": 2,
"format": "dateFormat_yyyymmdd"
}, },
{ {
"name": "전체", "name": "전체",
"colspan": 3 "colspan": 2
}, },
{ {
"name": "SMS", "name": "SMS",
"colspan": 3 "colspan": 2
}, },
{ {
"name": "LMS", "name": "LMS",
"colspan": 3 "colspan": 2,
"format": "Format_00"
}, },
{ {
"name": "MMS", "name": "MMS",
"colspan": 3 "colspan": 2
}, },
{ {
"name": "알림톡", "name": "알림톡",
"colspan": 3 "colspan": 2
} }
], ],
[ [
{ {
"key": "sndCnt", "key": "sndCnt",
"name": "발송건수" "name": "발송건수",
"format": "Format_00"
}, },
{ {
"key": "succCnt", "key": "succCnt",
"name": "성공건수" "name": "성공건수/(%)"
},
{
"key": "succRt",
"name": "성공률(%)"
}, },
{ {
"key": "sndCntS", "key": "sndCntS",
"name": "발송건수" "name": "발송건수",
"format": "Format_00"
}, },
{ {
"key": "succCntS", "key": "succCntS",
"name": "성공건수" "name": "성공건수/(%)"
},
{
"key": "succRtS",
"name": "성공률(%)"
}, },
{ {
"key": "sndCntL", "key": "sndCntL",
"name": "발송건수" "name": "발송건수",
"format": "Format_00"
}, },
{ {
"key": "succCntL", "key": "succCntL",
"name": "성공건수" "name": "성공건수/(%)"
},
{
"key": "succRtL",
"name": "성공률(%)"
}, },
{ {
"key": "sndCntM", "key": "sndCntM",
"name": "발송건수" "name": "발송건수",
"format": "Format_00"
}, },
{ {
"key": "succCntM", "key": "succCntM",
"name": "성공건수" "name": "성공건수/(%)"
},
{
"key": "succRtM",
"name": "성공률(%)"
}, },
{ {
"key": "sndCntR", "key": "sndCntR",
"name": "발송건수" "name": "발송건수",
"format": "Format_00"
}, },
{ {
"key": "succCntR", "key": "succCntR",
"name": "성공건수" "name": "성공건수/(%)"
},
{
"key": "succRtR",
"name": "성공률(%)"
} }
] ]
] ]